Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delayed iqoption data (Not realtime?) #110

Open
jimmylai-hk opened this issue Apr 21, 2019 · 1 comment
Open

Delayed iqoption data (Not realtime?) #110

jimmylai-hk opened this issue Apr 21, 2019 · 1 comment

Comments

@jimmylai-hk
Copy link

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)

@jimmylai-hk
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant