Details on how to get Binance public data
Details on how to get Binance public data
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.
Note: The timestamp for SPOT Data from January 1st 2025 onwards will be in microseconds.
The aggTrades files' data is obtained from /api/v3/aggTrades API endpoint:
The klines files' data is obtained from /api/v3/klines API endpoint:
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.The trades files' data is obtained from /api/v3/historicalTrades API endpoint:
The aggTrades files' data is the same as that from /fapi/v1/aggTrades or /dapi/v1/aggTrades API endpoints:
USD-M Futures klines files' data is from /fapi/v1/klines API endpoint:
COIN-M Futures klines files' data is from /dapi/v1/klines API endpoint:
USD-M Futures trades files' data is from /fapi/v1/trades API endpoint and save into a file with these columns:
COIN-M Futures trades files' data is from /dapi/v1/trades API endpoint and save into a file with these columns:
# 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.
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
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:
Date Changelog File Note 2022-08-08 updates/2022-08-08_kline_updates.zip Fixed inconsistent data 2022-04-21 updates/2022-04-21_aggregate_trade_updates.zip Align to the Spot aggregate trade data changePlease open an issue here.
MIT
No open issues yet, or sync has not completed.