Lu-Yi-Hsun / iqoptionapi

IQ Option API
372 stars 289 forks source link

updated to latest version 3.9.2 but buy still not working in OTC #117

Open redmiix24 opened 5 years ago

redmiix24 commented 5 years ago

Hi Lu, Thank you for the update. But the buy option still not working

Traceback (most recent call last): File "test.py", line 19, in print(I_want_money.buy(Money,ACTIVES,ACTION,expirations_mode)) File "/usr/local/lib/python2.7/dist-packages/iqoptionapi/stable_api.py", line 660, in buy self.api.buy(price, OP_code.ACTIVES[ACTIVES], ACTION, expirations) File "/usr/local/lib/python2.7/dist-packages/iqoptionapi/ws/chanels/buyv2.py", line 25, in call exp,idx=get_expiration_time(int(self.api.timesync.server_timestamp),duration)
File "/usr/local/lib/python2.7/dist-packages/iqoptionapi/expiration.py", line 11, in get_expiration_time if (int((exp_date+timedelta(minutes=1)).timestamp())-timestamp)>30: AttributeError: 'datetime.datetime' object has no attribute 'timestamp'

Lu-Yi-Hsun commented 5 years ago

That is python2 datetime library problem!

I will write for support python2 version

Lu-Yi-Hsun commented 5 years ago

fix