Order Matching

TxFlow uses a Price-Time Priority matching engine (Central Limit Order Book / CLOB).

Matching Priority

Orders are matched according to:

  1. Best Price First — Highest bid (for sells) or lowest ask (for buys)

  2. Oldest Order First — If multiple orders have the same price, the earliest order is matched first

Matching Process

When a taker order arrives:

  1. Find the best maker order on the opposite side

  2. Execute at the maker's price (price improvement for takers)

  3. Repeat until the taker order is fully filled OR no more crossing orders exist

  4. If unfilled, limit orders rest in the book; market/IOC orders are cancelled

Example

Order Book:

Bids (Buy)
Price
Asks (Sell)

2 BTC

$49,950

5 BTC

$49,900

$50,000

3 BTC

$50,050

4 BTC

Scenario: You place a Market BUY for 5 BTC.

  1. Match 3 BTC @ $50,000 (oldest ask)

  2. Match 2 BTC @ $50,050 (next best ask)

  3. Order fully filled; average execution price = $50,020

Pages
Description

Market, Limit, and advanced orders

Detailed liquidation mechanics

Trading and funding fees

Last updated