harwee/IQOption-Api

How to open binary position as quick as possible

aldhosutra opened this issue · 2 comments

After i tried this API several times, i found that i must start the websocket connection first with api.start(), then after that i can execute buy_v2 command.

Delay from api.start() is about 10 seconds in my case. I want to open binary position as soon as my signal is firing.

so, i want to know how i can quickly execute buy_v2 command, maybe without always calling api.start() everytime, or maybe by keeping my session alive?
How i can do that?

thanks

api.start is just to initialize the whole session, it sets the session key and everything else to talk to server, the 10 sec delay is to ensure that asynchronous request is completed. if you cant wait for 10 seconds and want to start buying immediately try this branch https://github.com/harwee/IQOption-Api/tree/async it's written using asyncio so no manual delay is added to it other than the network latency and session stability is much higher for the code in that branch, so you can start the session beforehand and buy when ever you want immediately.

cool, thanks for your response.
you're doing an amazing job!