Update don't work
Closed this issue · 2 comments
My code:
from iqoption_api import IQOption
api = IQOption("************","")
api.login() # Returns True if successful else False
print(api.active_account)
api.subscribe_market("EURUSD")
api.market_data
api.update_expiration_list("EURUSD")
print(api.binary_expiration_list["EURUSD"])
Error:
KeyError Traceback (most recent call last)
in ()
7 api.market_data
8 api.update_expiration_list("EURUSD")
----> 9 print(api.binary_expiration_list["EURUSD"])
KeyError: 'EURUSD'
The same happens with print(api.candle_data["EURUSD][1]) # prints candles
I have tried to use time.sleep(1) and with more time, but it doesn't work too
Tanks
What python version are you using? If you are using python 3.6+ I am going to push a rewrite in 2 days. Most of the current functionality is completely rewritten to be stable, if you can wait for two days you can use that.
You can try the code written here https://github.com/harwee/IQOption-Api/tree/async If you face any difficulty please reopen the issue