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

Optional auto reconnect feature #40

Open cdgn-coding opened 5 years ago

cdgn-coding commented 5 years ago

Hello, first of all thank you very much for your effort constructing this library.

I'm using this library to test strategies. Sometimes the connection gets closed, I was thinking that an optional auto reconnect feature may be useful for this.

I would help you implement this if we think of an implementation before hand.

Regards

harwee commented 5 years ago

You can try replacing https://github.com/harwee/IQOption-Api/blob/async/iqoption_api/api.py#L147 with await self.establish_socket_connection_and_run(), that should re establish the socket connection when it is dropped.