Can't download Binance futures klines with 1s interval

184 Views Asked by At

I'm trying to download Binance USD-M futures 1s klines using Binance API

from binance.client import Client, HistoricalKlinesType

symbol = 'ETHUSDT'
interval = "1s"
date_from = "19 Aug 2023"
date_to = "20 Aug 2023"
client = Client()

klines = client.get_historical_klines(symbol, interval, date_from, date_to, klines_type=HistoricalKlinesType.FUTURES)

But receive error:

binance.exceptions.BinanceAPIException: APIError(code=-1120): Invalid interval.

This problem presented only when trying to download futures klines, when spot used this code works. Maybe anyone know how to download this klines properly.

1

There are 1 best solutions below

0
Binance On

1s is not an available interval for USD-M futures. The smallest one is the 1m.