Open jimmylai-hk opened 5 years ago
The updated code should be as following.
while True: last_seconds=int(time.strftime("%S")) last_minutes=int(time.strftime("%M")) decimal=currency_decimal[pair] if (last_seconds >= 59) time.sleep(2) candles_con=con.getcandles(OP_code.ACTIVES[symbol], 60,2,time.time()) while con.candles.candles_data==None: pass candles_iq=pd.DataFrame(con.candles.candles_data)
I try to read one minute iq option data at every minute using the following code.
However, I found that the returned data is not realtime. THe data delayed for 2-3 minutes. Let say the current time in iqoption platform is 21:53:01. I want to read the last candle which is 21:52 but the return data is at 21:50.
Anyone have similar finding?
while True: last_seconds=int(time.strftime("%S")) last_minutes=int(time.strftime("%M")) decimal=currency_decimal[pair] if (last_seconds >= 59) time.sleep(2) candles_con=con.getcandles(OP_code.ACTIVES[symbol], 60,1,time.time()) while con.candles.candles_data==None: pass candles_iq=pd.DataFrame(con.candles.candles_data)