Market by order vs market by price
The difference between market-by-price (Level 2) and market-by-order data, what each lets you see, and which one a replay of your recording needs.
What you get: a plain explanation of two ways an order book can be recorded, and which questions each one can answer.
The two views
Market by price (often called Level 2) is usually shown as one number per price: the total size resting there. At 100.25 there might be 40 on the bid. You see that the total changed. You do not see who it belongs to.
Market by order keeps every resting order on its own: its id, its size, and when it arrived. At 100.25 you would see, say, five separate orders that add up to 40, in the order they are lined up.
What each one lets you see
| Question | Market by price | Market by order |
|---|---|---|
| How much size is at this price? | Yes | Yes |
| How did the total at this price change? | Yes | Yes |
| Was it one big order or many small ones? | No | Yes |
| Which orders were ahead of a given order? | No, it can only be estimated | Yes |
| Smaller files, simpler to load | Yes | Larger, more detail |
The numbers in the example above are made up for illustration.
Which one do you have?
It depends on what your data source records. Depth files that list a price and a total size are market by price. Feeds that list individual orders with ids are market by order. Some data vendors sell both. Check your own source’s documentation, and check the terms under which you may keep and replay the data. The licence is yours to read; Matchstick does not give or sell market data.
What Replay reads today
Replay reads price-level (Level 2) books: Tardis.dev
incremental_book_L2 files. It does not read market-by-order files yet. If you only have
market-by-order data, it would first have to be converted to price levels by adding up the orders
at each price, and the per-order detail would be lost in that step.
Your files are read in your browser and stay on your machine.
What you do next
Open the free demo to see a price-level book replayed on a synthetic sample session. If market-by-order replay would matter to you, say so by joining the notification list.
To talk to Matthew about how you replay trades, email hello@matchstick.trading.