harwee / IQOption-Api

** Unmaintained ** I have rewritten some of the functionality using async if you are want to use the updated code you can use the code from `async` branch
Apache License 2.0
52 stars 54 forks source link

Update don't work #29

Closed eliabsbueno closed 6 years ago

eliabsbueno commented 6 years ago

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
harwee commented 6 years ago

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.

harwee commented 6 years ago

You can try the code written here https://github.com/harwee/IQOption-Api/tree/async If you face any difficulty please reopen the issue