Order Books
Definition
An order book is a book or more specifically an electronic list of buy and sell orders for a specific asset or instrument organized by price. The order book lists the number of units being bid on or offered per price point, or market depth.
Details
The order book endpoints at Amberdata are complete order books which allow you to see every bid and ask for every asset and pair on every exchange we support. If you need to reconstruct an order book from a particular exchange, with a particular pair from a particular point in time, you can do this from our REST endpoints. This is particularly useful if you are doing research, backtesting a model or just want to see what happened in the past with a particular dataset. We offer order book data across all four of our market data sections: spot, swaps, futures and options. In addition to the full order book, we also have snapshots of the order books for the same four sections. These snapshots are 1 minute looks at the order books. If the deepest granularity of the full order book is not needed, the snapshot endpoints are the next best thing and will allow you to see what happened at a higher level for any pair at any time on any exchange we support.
- Bid - the highest rate that someone is willing to buy the currency from you
- Ask - the lowest rate that someone in the market is willing to sell you the currency
- Mid - average of the bid and ask rates (the bid and ask prices will be either side of the mid market rate)
- Last - price at which the last trade occurred
API Endpoints
Spot
/markets/spot/order-book-events/{instrument}
/markets/spot/order-book-snapshots/{instrument}
/markets/spot/order-book-snapshots/information
Futures
/markets/futures/order-book-events/{instrument}
/markets/futures/order-book-snapshots/information
/markets/futures/order-book-snapshots/{instrument}/historical
Options
/markets/options/order-book-events/information
/markets/options/order-book-events/{instrument}/historical
/market/options/order-book-snapshots/information
/market/options/order-book-snapshots/{instrument}/historical
Swaps
/market/swaps/order-book-events/information
/market/swaps/order-book-events/{instrument}/historical
/market/swaps/order-book-snapshots/information
/market/swaps/order-book-snapshots/{instrument}/historical
Availability
Our Order Book endpoints are available via REST API for latest and historical (time series) data as well as WebSockets for real-time data.
This table outlines how far back our Order Book data goes across the different exchanges within the Spot, Futures, Swaps and Option markets
Exchange | Spot Market Start Date* | Futures Market Start Date* | Options Market Start Date* | Swaps Market Start Date* |
---|---|---|---|---|
Binance | 2019-04-05 | 2021-04-16 | X | X |
Binance.US | 2022-06-14 | |||
Bitfinex | 2019-04-05 | X | X | X |
Bitget | 2024-09-29 | X | X | X |
Bithumb | 2021-06-02 | X | X | X |
Bitmex | X | 2021-04-16 | X | 2021-04-16 |
Bitstamp | 2019-04-05 | X | X | X |
Bybit | 2021-09-01 | 2021-10-30 | 2024-03-15 | X |
CBOE Digital | 2024-04-02 | 2024-03-31 | X | X |
GDAX (Coinbase Pro) | 2019-04-05 | X | X | X |
Deribit | X | 2021-05-20 | 2021-11-23 | X |
FTX** | 2021-01-11 | 2021-04-16 | X | X |
FTX US** | 2022-10-05 | X | X | X |
Gemini | 2019-04-05 | X | X | X |
Huobi | 2019-04-05 | 2021-02-19 | X | 2021-04-16 |
itBit | 2024-03-05 | |||
Kraken | 2018-01-13 | 2022-08-18 | X | X |
LMAX | 2021-05-27 | X | X | X |
Mercado Bitcoin*** | 2024-04-02 | X | X | X |
MEXC | 2022-10-19 | X | X | X |
OKex | 2020-01-23 | 2021-07-12 | 2024-03-15 | 2021-07-12 |
Poloniex | 2019-08-15 | X | X | X |
ZB | 2021-06-02 | X | X | X |
Thalex | X | X | 2024-09-06 | X |
*These dates represent the oldest start date we have for Order Book data across all pairs/contracts
**As of 2022-11-12, we stopped supporting FTX, but historical data will remain available
***Mercado Bitcoin is OBS only
Order Book Depth
Below is a table with the maximum order book depth that we collect for each exchange we support.
Exchange | Spot Data | Futures Data | Options Data | Swaps Data |
---|---|---|---|---|
Binance | 5000 | 1000 | X | X |
Binance.US | 5000 | X | X | X |
Bitfinex | 100 | X | X | X |
Bitget | 150 | X | X | X |
Bithumb | 50 | X | X | X |
Bitmex | X | Full Depth | X | Full Depth |
Bitstamp | Full Depth | X | X | X |
Bybit | 200 | 200 | 25 | X |
CBOE Digital | 20 | 20 | X | X |
GDAX (Coinbase Pro) | Full Depth | X | X | X |
Deribit | X | 1000 | 1000 | X |
FTX** | 100 | 100 | X | X |
FTX US** | 100 | 100 | 100 | 100 |
Gemini | Full Depth | X | X | X |
Huobi | 150 | 150 | X | 150 |
itBit | Full Depth | X | X | X |
Kraken | 100 | Full Depth | X | X |
LMAX | Full Depth | X | X | X |
Mercado Bitcoin | 1000 | X | X | X |
MEXC | 5000 | X | X | X |
OKex | 400 | 400 | 400 | 400 |
Poloniex | 150 | X | X | X |
ZB | 50 | X | X | X |
Frequently Asked Questions
How granular is your order book data?
- Our order book data is extremely granular and includes every ‘flick’ of a bid or ask for any pair on any exchange we support. Some exchange data is available from as early as 2011.
What are common use cases for your order book data?
- The most common use case for our order book data is research and/or back testing. If you’re writing a paper and need to reconstruct an order book from Bitstamp in 2014 for the BTC_USD pair, you can do that. If you’re testing a new model and need X months of data across multiple exchanges for multiple pairs, you can do that too from our historical REST endpoints.
Do you offer real-time streaming order book data?
- Yes. We have Websocket subscriptions for all 4 order book types; spot, options, futures and swaps.
Where do you get your order book data from?
- All of our order book data comes directly from the exchanges themselves which is provided to the public.
What is the difference between Order Book Snapshots and Order Book Events?
- For Order Book Snapshots, we collect via the exchanges REST API and the snapshot is a one minute snapshot. Every minute we get the full order book, full depth, from the exchange (as much as they provide). Some exchanges are restricted in what they provide and some exchanges only provide 50 price levels in their snapshot. Then there are some, like Binance or Coinbase, that have a very deep snapshot, sometimes couple 1000’s, so it really depends on the exchanges.
- For Order Book Events, it’s not a full snapshot, it’s just whatever changes on a specific interval. The exchanges claim that it’s a real-time feed, but at the end of the day, they do some batching on their side as well. Of course it depends on the exchanges. For example, 100 milliseconds or 10-15 millisecond updates, and they batch the updates in that interval. So this is how you would get the data from us as well since this is how it is provided.
Why do you call it Order Book Events and not Updates?
- If you take two different order book snapshots, the order book events are the updates that happened in between different snapshots. We call them events and not updates because an event can be multiple things like an update, an addition, or a delete. So the delete is easy, volume equals zero - a delete from the order book. For additions and updates, it’s the new quantity, so additions and inserts really are treated the same way. You get that new event, just replace what you have. It’s not a plus or minus, it’s just the new quantity.
Updated 17 days ago