n1nj4z33 / iqoptionapi

IQ Option API 4.x (Python 2.7) The project is obsolete and is not supported because of problems with access to IQ Options in Russia
120 stars 545 forks source link

Buy does not work #16

Closed AllenUchiha closed 7 years ago

AllenUchiha commented 7 years ago

It seems like the buy API doesn't work for me. Is anyone having the same issue? Is the problem currently being fixed?

frxncisjoseph commented 7 years ago

No, I'm having the same issue.

I'm not sure what the problem is but I am going to investigate tonight, possibly due to IQ Option updating their handling of WS? Who knows.

Olascoaga commented 7 years ago

https://github.com/n1nj4z33/iqoptionapi/issues/2#issuecomment-269313182

AllenUchiha commented 7 years ago

@Olascoaga I tried to replace this part

def expiration_timestamp(self): """Property to get expiration timestamp. :returns: The expiration timestamp. """

return time.mktime(self.expiration_datetime.timetuple())

return time.mktime(self.expiration_datetime.replace(second=0, microsecond=0).timetuple())

but it still doesn't buy the options as I instructed it to.

--EDIT--

Thank you very much for the help. It is finally working! 👍

frxncisjoseph commented 7 years ago

How did you manage to fix this issue? Please share with us.

AllenUchiha commented 7 years ago

@frxncisjoseph it is as @Olascoaga directed me to. Replace the expiration_timestamp last line and it should work.

frxncisjoseph commented 7 years ago

Working 100%, just as a note - if you're not running Python via a terminal and instead via an IDE then make sure that your application is kept alive. You can commonly do this via a while statement.

tjlabais commented 6 years ago

still works as of today?