Συχνές ερωτήσεις
Προς το παρόν, αυτό το άρθρο δεν υποστηρίζεται στη γλώσσα σας. Προτείνεται η αυτόματη μετάφραση για τα Αγγλικά.
Αρχική σελίδα
Κέντρο υποστήριξης
Συχνές ερωτήσεις
Παράγωγα κρύπτο
Binance Futures Order Book Historical Data

Binance Futures Order Book Historical Data

2020-08-17 07:51
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.
Data Schema
FieldDescription
symbolBoth COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925')
timeTransaction 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-
puLast_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
symboltimestampfirst_update_idlast_update_idpusideupdate_typepriceqty
BTCUSDT1593647999921395381084203953810842039538108419aset9235.090
BTCUSDT1593647999933395381084443953810844439538108420aset9236.040.852
BTCUSDT1593647999954395381084723953810847239538108444bset9219.670
BTCUSDT1593647999983395381084973953810849739538108472aset9236.040.912
BTCUSDT1593647999983395381084983953810849839538108497aset9235.110
Data Schema
FieldDescription
symbolBoth COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925')
timeTransaction 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-
puLast_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

symboltimestampfirst_update_idlast_update_idsideupdate_typepriceqty
SOLUSDT168566398900429030221368462903022136846asnap20.487551
SOLUSDT168566398900429030221368462903022136846asnap20.488404
SOLUSDT168566398900429030221368462903022136846asnap20.489229
SOLUSDT168566398900429030221368462903022136846bsnap20.485866
SOLUSDT168566398900429030221368462903022136846bsnap20.485298
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.
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
FieldDescription
symbolBoth COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925')
timeTransaction 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_idTransaction 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
symboltimestampfirst_update_idlast_update_idsideupdate_typepriceqtytrans_id
SOLUSDT168566398900429030221368462903022136846asnap20.487551232143412
SOLUSDT168566398900429030221368462903022136846asnap20.488404232143423
SOLUSDT168566398900429030221368462903022136846asnap20.489229232143415
SOLUSDT168566398900429030221368462903022136846bsnap20.485866232143419
SOLUSDT168566398900429030221368462903022136846bsnap20.485298243215125
Depth update sample data
symboltimestampfirst_update_idlast_update_idsideupdate_typepriceqtytrans_id
SOLUSDT168557758919128998076909572899807690957bset20.611201232143412
SOLUSDT168557758919128998076909632899807690963bset20.542124232143423
SOLUSDT168557758919328998076909822899807690982aset20.952116232143415
SOLUSDT168557758919328998076909902899807690990aset21.02135232143419
SOLUSDT289980769099028998076909942899807690994bset20.6781476243215125
Data schema
FieldDescription
symbolBoth COIN-M and USDⓈ-M Futures symbols are supported (queried through different symbols, for example: 'BTCUSDT', 'BTCUSD_200925')
timestampTransaction time in timestamp. From 2020/07/01 to the current date. For newly launched symbols , start from the launch date.
update_idLast 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.