-
Notifications
You must be signed in to change notification settings - Fork 3.9k
dynamic/configurable exchange polling interval #336
Comments
This used to be configurable, currently it is not (This could be added again, it should probably be a property on each exchange object in exchange.js). If you want to play with it yourself, you can do that here for now. |
After looking at more code I see some problems with the current setup: The flow was meant to be:
All this code is there however it is not hooked up correctly: The A problem with this is that there is now a new piece of code that gets initial market data to see if Gekko can sync up trade data from local database to the the exchange, and this code cannot handle retries (I think we should replace the descending parameter in getTries with a retry flag, indicating who should handle retries. |
Hey, hi! |
Yes, definitely a good idea! We also need websockets for other exchangs (like OKcoin, because of the amount of trades). Gekko works with a concept of markets, so we just need to add a "websocket" market type. Not a lot of functionality needs to be written for that (we can just pipe them straight into the tradeBatcher or candleCreator. The bad thing about websockets is that you don't have access to historical data, also the situation that if you lose connection for a minute you have incomplete data. |
@askmike That depends on the exchange. For instance, on BitMEX, you are automatically pushed historical data as soon as you subscribe to any public or private stream. |
@askmike this can be closed. |
@greenbigfrog is right, this can indeed be closed. This is now handled by Gekko Broker! |
While gekko is scanning the exchange it sometimes gets this kind of errors. Is it possible to define how often to poll exchange for new trade data? this would help me to pin if it's some kind of flood protection on cex or some firewall dropping connections.
2016-06-21 07:53:26 (DEBUG): Processing 3 new trades.
2016-06-21 07:53:26 (DEBUG): From 2016-06-21 07:53:03 UTC to 2016-06-21 07:53:03 UTC. (a few seconds)
2016-06-21 07:53:35 (DEBUG): Requested / trade data from CEX.io ...
2016-06-21 07:53:40 (DEBUG): cex.io returned an error, retrying.. [SyntaxError: Unexpected end of input] waiting for 10000 ms
2016-06-21 07:53:56 (DEBUG): Requested / trade data from CEX.io ...
The text was updated successfully, but these errors were encountered: