askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.06k stars 3.95k forks source link

Realtime update price for Bitfinex #1294

Closed John1231983 closed 6 years ago

John1231983 commented 6 years ago

I am using Bitfinex and development branch. I found that the processing of Gekko to get the price for Bitfinex has some delay as the attached file. The Gekko print the price that delays about 4~5 seconds than what I saw in office bitfinex website (and tradeview). What parameter should I change to see realtime price in bitfinex? It means the newest buy/sell price. Thanks

untitled

askmike commented 6 years ago

Gekko is not designed for speed. Even if Gekko were to fetch all the trades straight away, your strategy would not do much since everything is aggregated into 1 minute candles (or probably even bigger, like hourly candles). And on top of that most indicators smooth out calculations over a set historical candles.

There are a lot of trading bots that are a lot more realtime (arbitrage bots, market making bots, etc), though they solve different problems than Gekko. Read this page for details about the scope of the project and limitations: https://gekko.wizb.it/docs/introduction/scope.html

John1231983 commented 6 years ago

Thanks @askmike for reply. I found that bittrex can support realtime, while bitfinex is not. I guess that is API issue, not gekko.

askmike commented 6 years ago

They both have websocket APIs (realtime stream APIs), but Gekko doesn't use either.