Open mrxz44 opened 1 year ago
The plot of this data is as follows:
Firstly, please specify timezone. I need to fill start_str
param to reproduce the data.
Secondly, I notice there was testnet=True
param in your sample code. Test net data could be anything.
Hi @halfelf, timezone UTC+3
Is problem still appearing after testnet=False?
Describe the bug get_historical_klines returns historical OHLC data as expected, but the data itself doesn't match with actual spot prices. In that particular case 'high' and 'low' values for some candles differ significantly from the actual.
To Reproduce
h[0] is a timestamp, h[2] is low, h[3] is high following loop shows high-low discrepancy (
round(float(h[3])-float(h[2]))
) in retrieved dataoutput sample: 2023-06-07 18:17:00 ['26486.29000000', '52980.20000000', '26480.90000000', '26531.10000000'] -26499 2023-06-07 18:18:00 ['26525.84000000', '29898.26000000', '26516.73000000', '26552.90000000'] -3382 2023-06-07 18:19:00 ['26552.90000000', '29910.94000000', '26547.94000000', '26552.77000000'] -3363 2023-06-07 18:20:00 ['26550.61000000', '26843.00000000', '23146.02000000', '26535.92000000'] -3697 2023-06-07 18:21:00 ['26535.92000000', '26555.12000000', '26529.87000000', '26555.12000000'] -25 2023-06-07 18:22:00 ['26555.54000000', '29973.00000000', '23131.36000000', '26541.92000000'] -6842 2023-06-07 18:23:00 ['26541.92000000', '29958.81000000', '26524.92000000', '26531.49000000'] -3434 2023-06-07 18:24:00 ['26533.62000000', '26533.63000000', '26488.19000000', '26493.91000000'] -45
2023-06-07 18:18:00 shows high 52980.20 which is clearly not right. Correct values are for 2023-06-07 18:21:00 and 2023-06-07 18:24:00 in that sample.
Expected behavior It is expected to receive data that matches the actual historical data that can be verified on Binance Spot.
Environment (please complete the following information):
Logs or Additional context Add any other context about the problem here.