Ccxt binance fetchOHLCV doesn't return last data

506 Views Asked by At

I am using ccxt library for binance. To calculate the sar indicator, I am using fetchOHLCV to get last last historical data but the problem is that some times data are not reflecting the last binance data. We observe some delays Can anyone help me?

1

There are 1 best solutions below

0
Kaushik Dalsaniya On
exchange = ccxt.binance({"apiKey": api_key,"secret": api_secret,'enableRateLimit': True})
pair = 'ETH/USDT'
timeframe='1m'
exchange.fetch_ohlcv(coin_pair, timeframe,limit=1000)