iqoptionapi icon indicating copy to clipboard operation
iqoptionapi copied to clipboard

Regarding GetCandles() method

Open Sekharonline4u opened this issue 3 years ago • 1 comments

Hello Friends, I got a strange problem i have been trying to read the 1m candle data using iqoptionapi get_candles method using the following line "bars = Iq.get_candles(goal,1,100,time.time())".

This code will be executed for every 10 seconds to fetch the candle data i have use "schedule" to invoke the bot method using the following code

schedule.every(10).seconds.do(run_bot)
while True:
    schedule.run_pending()
    time.sleep(1)

where run_bot is the method in which i was calling the get_candles method.

Everything was working fine till yesterday but today i got an issue the run_bot method is getting invoked for every 10 seconds but the get_candles method is not returning the current time candles for ex. If the current time is 7.30 PM IST it was fetching the data of 2:30 PM IST and I was testing the code from 4:30 PM IST till now It was fetching the same candle sticks data.

What is the problem why the code which was working fine till yesterday is not working now and fetching the latest closed candles data ?

I have attached the screenshot where we you can notice the current system time and also the fetch closed candle stick data time stamp also i have converted to GMT 5.30 for understanding easily.

Please kindly advise

Screenshot 2021-07-31 at 7 30 57 PM

Thanks and Regards, Sekhar

Sekharonline4u avatar Jul 31 '21 14:07 Sekharonline4u

There use to be downtime on the get candle function sometimes. maybe that was what happened

ezekielphlat avatar Sep 02 '21 15:09 ezekielphlat