Search code examples
binance

What are the column header names in from historical klines websocket in binance?


I am retrieving historical data from binance using the 'get_historical_klines' (http://python-binance.readthedocs.io/en/latest/binance.html#binance.client.Client.get_historical_klines)

I am returned what the documentation is is OHLCV but that doesnt seem to be the case I get 10 numerical column headers from the websocket but can not find any where in the documentation what the 10 column headers are?

Example of websocket sorted into a dataframe.

              0           1           2           3           4   \
0  1526397360000  0.00149350  0.00149360  0.00149200  0.00149360   

              5              6           7   8              9           10 11  
0  1535.88000000  1526397419999  2.29395137  30  1477.75000000  2.20716183  0  

Solution

  • The Python-Binance API wrapper is not officially from Binance, but it uses the Binance API. The kline/candlestick headers are documented in Binance's Rest API

    Here is the example and column headers provided in that documentation.

    [
      [
        1499040000000,      // Open time
        "0.01634790",       // Open
        "0.80000000",       // High
        "0.01575800",       // Low
        "0.01577100",       // Close
        "148976.11427815",  // Volume
        1499644799999,      // Close time
        "2434.19055334",    // Quote asset volume
        308,                // Number of trades
        "1756.87402397",    // Taker buy base asset volume
        "28.46694368",      // Taker buy quote asset volume
        "17928899.62484339" // Ignore.
      ]
    ]