binance / binance-public-data

Details on how to get Binance public data
1.47k stars 462 forks source link

Inconsistent csv headers #283

Closed xzmeng closed 11 months ago

xzmeng commented 11 months ago

It seems that the spot klines csv files don't have a header, but futures klines csv files have a header.

For example:

https://data.binance.vision/data/spot/daily/klines/BTCUSDT/1h/BTCUSDT-1h-2023-10-27.zip BTCUSDT-1h-2023-10-27.csv

1698364800000,34151.66000000,34171.28000000,33972.39000000,34015.27000000,908.27901000,1698368399999,30937869.62302600,41459,416.48838000,14187002.70550060,0
1698368400000,34015.27000000,34054.48000000,33780.00000000,33848.47000000,1439.61708000,1698371999999,48834748.13159950,63969,583.65349000,19801364.63410430,0
1698372000000,33848.47000000,34142.63000000,33810.00000000,34088.57000000,1054.39547000,1698375599999,35873469.77708990,43767,523.76290000,17815957.44816930,0
...

https://data.binance.vision/data/futures/cm/daily/klines/BTCUSD_PERP/1h/BTCUSD_PERP-1h-2023-10-27.zip BTCUSD_PERP-1h-2023-10-27.csv

open_time,open,high,low,close,volume,close_time,quote_volume,count,taker_buy_volume,taker_buy_quote_volume,ignore
1698364800000,34161.6,34182.5,33977.4,34024.2,409953,1698368399999,1202.97118037,15095,192220,564.12041453,0
1698368400000,34024.2,34060.1,33776.4,33848.4,740960,1698371999999,2183.75671155,23938,368266,1085.17080793,0
1698372000000,33848.5,34150.0,33815.1,34094.2,390376,1698375599999,1147.73267094,13854,231446,680.60405822,0
...

It may be better to include the header or not in a consistent manner.

2pd commented 11 months ago

Thanks for feedback. There is difference between spot and futures data, please handle them accordingly.