Binance Public Data

January 9, 2025 ยท View on GitHub

The website Binance Data Collection offers easy access for anyone to download Binance's public market data, which is aggregated into daily or monthly files.

All symbols are supported, with new daily data becoming available the next day and new monthly data at the first monday of the month.

Data Information

SPOT

Note: The timestamp for SPOT Data from January 1st 2025 onwards will be in microseconds.

AggTrades

The aggTrades files' data is obtained from /api/v3/aggTrades API endpoint:

Aggregate tradeIdPriceQuantityFirst tradeIdLast tradeIdTimestampWas the buyer the makerWas the trade the best price match
00.2000000050.00000000001735689600010866FalseTrue

Klines

The klines files' data is obtained from /api/v3/klines API endpoint:

Open timeOpenHighLowCloseVolumeClose timeQuote asset volumeNumber of tradesTaker buy base asset volumeTaker buy quote asset volumeIgnore
17356896000000004.150700004.158700004.150600004.15540000539.2300000017356931999999992240.3986090013401.820000001669.981213000

All kline intervals are supported:

  • 1s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1mo.
  • 1mo is used instead of 1M to supprt non-case sensitive file systems.

Trades

The trades files' data is obtained from /api/v3/historicalTrades API endpoint:

trade IdpriceqtyquoteQtytimeisBuyerMakerisBestMatch
5117535817.801800005.69000000101.292242001735689600010866TrueTrue

FUTURES

  • USD-M Futures
  • COIN-M Futures

AggTrades

The aggTrades files' data is the same as that from /fapi/v1/aggTrades or /dapi/v1/aggTrades API endpoints:

Aggregate tradeIdPriceQuantityFirst tradeIdLast tradeIdTimestampWas the buyer the maker
261290.016331024.7044351527781277811498793709153true

Klines

USD-M Futures klines files' data is from /fapi/v1/klines API endpoint:

Open timeOpenHighLowCloseVolumeClose timeQuote asset volumeNumber of tradesTaker buy base asset volumeTaker buy quote asset volumeIgnore
14990400000000.016347900.800000000.015758000.01577100148976.1142781514996447999992434.190553343081756.8740239728.4669436817928899.62484339

COIN-M Futures klines files' data is from /dapi/v1/klines API endpoint:

Open timeOpenHighLowCloseVolumeClose timeBase asset volumeNumber of tradesTaker buy volumeTaker buy base asset volumeIgnore
15912583200009640.79642.49640.69642.020615912583799992.13660389481191.234248650

Trades

USD-M Futures trades files' data is from /fapi/v1/trades API endpoint and save into a file with these columns:

trade IdpriceqtyquoteQtytimeisBuyerMaker
284574.0000010012.0000000048.001499865549590true

COIN-M Futures trades files' data is from /dapi/v1/trades API endpoint and save into a file with these columns:

trade IdpriceqtybaseQtytimeisBuyerMaker
284579635.010.010378831591250192508true

How to download programatically

# Examples for downloading monthly Spot 1h lines for "ADABKRW" symbol.
curl -s "https://data.binance.vision/data/spot/monthly/klines/ADABKRW/1h/ADABKRW-1h-2020-08.zip" -o ADABKRW-1h-2020-08.zip
wget "https://data.binance.vision/data/spot/monthly/klines/ADABKRW/1h/ADABKRW-1h-2020-08.zip"

More examples are available in the form of helper scripts in both the python and shell folders of this repository for downloading from the website. In case you want to obtain all current running symbols from Spot and Futures, you can take use of shell/fetch-all-trading-pairs.sh script.

CHECKSUM

Each zip file has a .CHECKSUM file together in the same folder to verify data integrity. The verification can be done through:

# Linux
sha256sum -c BNBUSDT-1m-2021-01.zip.CHECKSUM

# MacOS
shasum -a 256 -c BNBUSDT-1m-2021-01.zip.CHECKSUM

Updates

Archived files may be updated at a later date as a result of recently discovered issues. Below is an exhaustive list of updates performed to the archive, containing the file path for reference, and CHECKSUMs of the replaced file and the replacement file:

DateChangelog FileNote
2022-08-08updates/2022-08-08_kline_updates.zipFixed inconsistent data
2022-04-21updates/2022-04-21_aggregate_trade_updates.zipAlign to the Spot aggregate trade data change

Issue/Question

Please open an issue here.

Licence

MIT