12-11-2018, 10:09 AM
Quote:Synthesized candle works fine in realtime trader, speed is OK there, but it becomes an issue when backtesting with imported history data. I tried to import half a year's data from bitfinex and it took a whole night to complete. I guess it'll be slower if the rate limit is low for an exchange.
Yes, the slow part is the API requests to fetch all trades, Gekko can consolidate millions of trades into candles pretty fast.
There are 2 major reasons for this:
- When the importer was written no big exchanges had API endpoints to fetch candles: this was years ago (when binance didn't exist yet for example). I want to rewrite the importer to take advantage of these kind of endpoints, but it's not at the top of my list (very much open for pull requests).
- Gekko candles include more than OHCL: they also include VWP, amount of trades and volume. The last one is also used by some strategies. So if you use an endpoint that doesn't include these metrics some strategies stop working, etc.