binance / binance-public-data

Details on how to get Binance public data
1.54k stars 475 forks source link

Missed klines UM 15min #230

Open yaroshoris opened 1 year ago

yaroshoris commented 1 year ago

Hi, I found that around 100 candles BNXUSDT within different time interval were missed. TF 15min. USDT Futures.

yaroshoris commented 1 year ago

The same with BNBUSDT, next timestamps were missed: from 1650152700000 to 1650240000000

yaroshoris commented 1 year ago

I download all datasets and started iterating through each timestamp.

For example if we are speaking about 15m TF my script comparing timestamp of 2 neigboor candles and if the value > 15m 60s 1000ms (ms) it'll give me a notification about where is gap has occured.

Code as example:

for i, row in enumerate(dataset): if i != len_a - 1: current_value = int(row[0]) // Get TS of current bar next_value = int(dataset[i + 1][0]) // Get TS of next bar predicted_value = current_value + 900000 // Gap should be (15m 60s 1000ms) == 900k ms if predicted_value != next_value: gap = int((next_value - predicted_value) / 900000) print(f"MARKET predicted_value {predicted_value} || next_value {next_value}, GAP {gap}") I have detected multiple gaps for the most of symbols that are traded on Binance. It occurs even on higher TF (60m).

Thanks for taking it into consideration and improving the consistency of the datasets.