Binance provides historical order book data on USDⓈ-M and COIN-M Futures to assist you with the backtesting and optimization of strategies, research and analysis, and integration into the Binance ecosystem. Stay tuned for a wider range of historical data in the future.
Access
You can access Binance Futures historical data here. If you are looking for historical order book data on Futures, you need to have a valid Futures account and this data can only be accessed via API by Binance VIP 1 or above users. Please note that you can only download order book data with API.
For further assistance, please contact data@binance.com.
Product specifications
Binance Futures enhanced its products on May 27, 2023, which led to variations in product specifications.
2020-06-01 to 2023-05-27
Three data types were provided:
- T_DEPTH (Tick-Level Orderbook): Tick-by-tick order book (level 2), directly fetched from our API and WSS different depth streams, with data gaps.
- S_DEPTH (Order book snapshot): Data starts from 2020-01, order book snapshot (level 2). This is a temp data solution only for BTCUSDT at the moment, providing a 2-level order book snapshot for the BTCUSDT symbol only.
- T_DEPTH_BACKFILL (Tick-Level Orderbook backfill): Tick-by-tick order book (level 2). T_DEPTH backfilled with internal logs had stopped producing since mid-July 2021.
T_DEPTH
Data Schema
Field | Description |
symbol | Both COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925') |
time | Transaction time in timestamp. From 2020/07/01 to the current date. For newly launched symbols , start from the launch date. |
first_update_id | - |
last_update_id | - |
pu | Last_update_id of the previous row, which helps examine completeness. Only applicable to COIN-M Futures depth update (not orderbook snapshot). |
side | a = ask (Sell order) b = bid (Buy order) |
update_type | snap = for order book snapshot only set = set price level to the current qty (not delta) delta = qty change of the price level (delta) |
price | - |
qty | - |
Sample Data
symbol | timestamp | first_update_id | last_update_id | pu | side | update_type | price | qty |
BTCUSDT | 1593647999921 | 39538108420 | 39538108420 | 39538108419 | a | set | 9235.09 | 0 |
BTCUSDT | 1593647999933 | 39538108444 | 39538108444 | 39538108420 | a | set | 9236.04 | 0.852 |
BTCUSDT | 1593647999954 | 39538108472 | 39538108472 | 39538108444 | b | set | 9219.67 | 0 |
BTCUSDT | 1593647999983 | 39538108497 | 39538108497 | 39538108472 | a | set | 9236.04 | 0.912 |
BTCUSDT | 1593647999983 | 39538108498 | 39538108498 | 39538108497 | a | set | 9235.11 | 0 |
S_DEPTH
Data Schema
Field | Description |
symbol | Both COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925') |
time | Transaction time in timestamp. From 2020/07/01 to the current date. For newly launched symbols , start from the launch date. |
first_update_id | - |
last_update_id | - |
pu | Last_update_id of the previous row which helps examine completeness. Only applicable to COIN-M Futures depth update (not order book snapshot). |
side | a = ask (Sell order) b = bid (Buy order) |
update_type | snap = for order book snapshot only set = set price level to the current qty (not delta) delta = qty change of the price level (delta) |
price | - |
qty | - |
Sample Data
symbol | timestamp | first_update_id | last_update_id | side | update_type | price | qty |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.487 | 551 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.488 | 404 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.489 | 229 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | b | snap | 20.485 | 866 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | b | snap | 20.485 | 298 |
2023-05-27 to present
Two data types can be provided:
- T_DEPTH (Tick-level order book): Tick-by-tick order book (level 2), generated from matching engine internal logs, no data gaps.
- S_DEPTH (Order book snapshot): order book snapshot (level 2); snapshot update for each minute on all depth for every symbol.
T_DEPTH
The downloaded T_DEPTH file should consist of two separate files. The first, ending in "_depth_snap", represents the order book depth snapshot at the commencement of the specified date. The second file, ending with "_depth_update", contains updates to the order book following the initial depth snapshot. Depth update data is grouped according to the trans_id level, enabling users to observe associated changes in order book price/quantity at each trans_id level. Please note that the trans_id is auto-incremented at the symbol level.
Data Schema
Field | Description |
symbol | Both COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925') |
time | Transaction time in timestamp. From 2020/07/01 to the current date. For newly launched symbols , start from the launch date. |
first_update_id | - |
last_update_id | - |
trans_id | Transaction id in matching engine, for each trans_id, there might be update on multiples orderbook price level |
side | a = ask (Sell order) b = bid (Buy order) |
update_type | snap = for order book snapshot only set = set price level to the current qty (not delta) |
price | - |
qty | - |
Depth snapshot sample data
symbol | timestamp | first_update_id | last_update_id | side | update_type | price | qty | trans_id |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.487 | 551 | 232143412 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.488 | 404 | 232143423 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | a | snap | 20.489 | 229 | 232143415 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | b | snap | 20.485 | 866 | 232143419 |
SOLUSDT | 1685663989004 | 2903022136846 | 2903022136846 | b | snap | 20.485 | 298 | 243215125 |
Depth update sample data
symbol | timestamp | first_update_id | last_update_id | side | update_type | price | qty | trans_id |
SOLUSDT | 1685577589191 | 2899807690957 | 2899807690957 | b | set | 20.611 | 201 | 232143412 |
SOLUSDT | 1685577589191 | 2899807690963 | 2899807690963 | b | set | 20.542 | 124 | 232143423 |
SOLUSDT | 1685577589193 | 2899807690982 | 2899807690982 | a | set | 20.952 | 116 | 232143415 |
SOLUSDT | 1685577589193 | 2899807690990 | 2899807690990 | a | set | 21.021 | 35 | 232143419 |
SOLUSDT | 2899807690990 | 2899807690994 | 2899807690994 | b | set | 20.678 | 1476 | 243215125 |
S_DEPTH
Data schema
Field | Description |
symbol | Both COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925') |
timestamp | Transaction time in timestamp. From 2020/07/01 to the current date. For newly launched symbols , start from the launch date. |
update_id | Last update |
side | a = ask (Sell order) b = bid (Buy order) |
price | - |
qty | - |
Sample data
timestamp | update_id | symbol | side | price | qty |
1693785660000 | 3230886649408 | BTCUSDT | a | 27414.3 | 0.003 |
1693785660000 | 3230886649408 | BTCUSDT | a | 26318.5 | 0.001 |
1693785660000 | 3230889577102 | BTCUSDT | a | 26067.7 | 1.394 |
1693785660000 | 3230886649408 | BTCUSDT | a | 28825 | 0.007 |
1693785660000 | 3230886649408 | BTCUSDT | a | 37232.1 | 0.001 |
1693785660000 | 3230886649408 | BTCUSDT | a | 26949.2 | 0.004 |
1693785660000 | 3230886649408 | BTCUSDT | b | 22357.5 | 0.005 |
1693785660000 | 3230886649408 | BTCUSDT | b | 10390.5 | 0.002 |
When does the data get updated?
T+1, data would normally be ready by 08:00 (UTC).
How to download the historical Futures order book level 2 data via API?
The data download API is part of the Binance API. For more details and examples, especially on SIGNED Endpoint security, please visit here.
In order to access historical order book data for Futures, the API account should also have an active Futures account and maintain a VIP user status.
How to obtain the Futures order book data via API?
Specify the following arguments to request the download link:
Symbol | Type | Mandatory | Note |
symbol | STRING | YES | support USDⓈ-M and COIN-M Futures symbols |
startTime | LONG | YES | If no startTime, default endTime to time - 7 days |
endTime | LONG | YES | If no endTime, default to the current time |
dataType | ENUM | YES | S_DEPTH / T_DEPTH |
rectWindow | LONG | NO | - |
timestamp | LONG | YES | - |
*The gap between the startTime and the endTime can’t be longer than 7 days.