sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.89k stars 2.2k forks source link

can't get history of klines of perpetual futures #1344

Open lode-runner opened 11 months ago

lode-runner commented 11 months ago

Hi, I want to ask how can I get the history of klines of perpetual futures. I can't find any eg or any parameters in the function to get klines of perpetual futures.

tempestblaze commented 11 months ago

client.get_historical_klines("BTCUSDT" Client.KLINE_INTERVAL_30MINUTE, klines_type=HistoricalKlinesType.FUTURES)

optional paraameters - start_str , end_str. (date string in UTC format or timestamp in milliseconds)