Provide various data types from recent years to help you accurately backtest strategies and understand the micro market.

Support downloading Filled orders from January 2023
Download
Support downloading Candlesticks chart from January 2023
Download
Support downloading Market depth from August 2021
Download
Support downloading Deepth snapshot from August 2021
Download
Request Path Construction:
https://download.gatedata.org/(biz)/(type)/(year)(month)/(market)-(year)(month).csv.gz
For example:
BTC-margined Contract-Depth Snapshot BTC_USD 2023-04-25 13:00~14:00 data ( the downloading time is Beijing time subtracted by 8 hours)
curl -O https://download.gatedata.org/futures_btc/orderbooks_slice/202304/BTC_USD-2023042505.gz
Code Example:
1
2file_biz = "futures_btc"
3file_type = "orderbooks_slice"
4market_value = "BTC_USD"
5is_orderbooks_slice = False
6
7days_range = ["20230201", "20230202", "20230203"]
8
9for file_date in days_range:
10 file_month = file_date[:6]
11 suffix = "" if is_orderbooks_slice else ".csv"
12 download_url = (
13 f"https://download.gatedata.org/{file_biz}/{file_type}/{file_month}/"
14 f"{market_value}-{file_date}{suffix}.gz"
15 )
16 print(download_url)Developer Tips:
Timezone conversion: the path uses UTC time
Depth snapshot: orderbooks_slice only provides text snapshots in .gz format.
K-line granularity: candlesticks_ followed by granularity, such as candlesticks_1m.
Variable Definitions:
Parameter Name | Business Meaning | Parameter Value | |
|---|---|---|---|
biz | Spot: <tag>spot</tag> | spot | |
USDT-M Futures: <tag>futures_usdt</tag> | futures_usdt | ||
BTC-M Futures: <tag>futures_btc</tag> | futures_btc | ||
type | Spot & Leverage (spot) | Trade History | deals |
K-line market data | candlesticks_* (* indicates k-line granularity: 1m,5m,1h,4h,1d,7d) | ||
Market depth data | orderbooks | ||
Market snapshot data | orderbooks_slice | ||
USDT/BTC Contract (futures_usdt / futures_btc) | Trade History | trades | |
K-line market data | candlesticks_* (* indicates k-line granularity: 1m,5m,1h,4h,1d,7d) | ||
Market depth data | orderbooks | ||
Market snapshot data | orderbooks_slice | ||
Mark Price | mark_prices | ||
Executed funding rate | funding_applies | ||
Update of forecasted funding rate for the next cycle | funding_updates | ||
time | year | 2023 | |
month | 01-12 | ||
day | 01-31 | ||
hour | 00-23 | ||
Note: The time is UTC time. If it is UTC-8 in China, you need to subtract 8 hours from the time of downloading: For example:
For 2023-04-25 13:00~14:00 data, its download time is 2023042505