askmike / gekko

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

[Trade Bot Error] Not able to run trade bots with kraken #2874

Closed skylinetech-team closed 4 years ago

skylinetech-team commented 4 years ago

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ... [ X] bug report [ ] question about the decisions made in the repository

Action taken (what you did) trade bot with kraken not working

but paper trade option works fine

reinstalled gekko couple of times with latest version v0.6.8 still not working

Expected result (what you hoped would happen) should be able to run trade bot with kraken

Actual result (unexpected outcome) 2019-12-11T21:40:03.266Z 'Cannot read property 'XETH' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/markhu/skyline_prod/client00001/gekko4000/exchange/wrappers/kraken.js:223:46) at checkFn (/home/markhu/skyline_prod/client00001/gekko4000/exchange/exchangeUtils.js:24:16) at /home/markhu/skyline_prod/client00001/gekko4000/exchange/wrappers/kraken.js:177:12 at response.then (/home/markhu/skyline_prod/client00001/gekko4000/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) unhandledRejection { Error at Object. (/home/markhu/skyline_prod/client00001/gekko4000/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/markhu/skyline_prod/client00001/gekko4000/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:778:30) name: 'ExchangeError', message: TypeError: Cannot read property 'XETH' of undefined at handle (/home/markhu/skyline_prod/client00001/gekko4000/exchange/wrappers/kraken.js:223:46) at checkFn (/home/markhu/skyline_prod/client00001/gekko4000/exchange/exchangeUtils.js:24:16) at /home/markhu/skyline_prod/client00001/gekko4000/exchange/wrappers/kraken.js:177:12 at response.then (/home/markhu/skyline_prod/client00001/gekko4000/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) }

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

skylinetech-team commented 4 years ago

Hi, Mike and team, seems this is just live trade bot connection / configuration issue, can your guys take a look and advise ?

skylinetech-team commented 4 years ago

@askmike after we tried fretrade and zenbots, Gekko still the most feature rich - smooth to use crypto trade bots platform.

we are trying to load our trade bot with Kraken, got errors - pls see #2874 complaining assets with kraken not valid when running live trade bots with Kraken.

we looked at https://github.com/askmike/gekko/blob/develop/exchange/wrappers/kraken-markets.json can't figure out whats the issue here.

could you please help ?

thanks much ! @askmike

hiyan commented 4 years ago

quick checked your error.. This is due to XETH is not added to the market file. You need to run the market file generator to update (if that still works)..

skylinetech-team commented 4 years ago

quick checked your error.. This is due to XETH is not added to the market file. You need to run the market file generator to update (if that still works)..

thanks ! will check the market file is been used for both paper trade and trade option, correct ?

paper trade works perfectly fine with Kraken, same currency and same asset - pair. trade bot is the one not working

skylinetech-team commented 4 years ago

quick checked your error.. This is due to XETH is not added to the market file. You need to run the market file generator to update (if that still works)..

thanks ! will check the market file is been used for both paper trade and trade option, correct ?

paper trade works perfectly fine with Kraken, same currency and same asset - pair. trade bot is the one not working

looking at https://github.com/askmike/gekko/blob/develop/exchange/util/genMarketFiles/update-kraken.js

seems it does have ETH, XRP and XBT ...

sanitariu commented 4 years ago

I am trading on kraken with gekko and every 2-3 days need bot restart..... its kind of working but not so good. I have already migrated my bots to freqtrade and i can assure you they are working way way better ! Yeah you miss the web browser but i have telegram :) Of course you can always draw charts with freqtrade plugins. Also zenbot is ok too. Do not push efforts here :( I think project is abandoned or going to be paid one. Also i think that there is one fork of the project here: https://github.com/IoTresor/gekko Maybe its better to ask there for help.

skylinetech-team commented 4 years ago

I am trading on kraken with gekko and every 2-3 days need bot restart..... its kind of working but not so good. I have already migrated my bots to freqtrade and i can assure you they are working way way better ! Yeah you miss the web browser but i have telegram :) Of course you can always draw charts with freqtrade plugins. Also zenbot is ok too. Do not push efforts here :( I think project is abandoned or going to be paid one. Also i think that there is one fork of the project here: https://github.com/IoTresor/gekko Maybe its better to ask there for help.

thanks, I tried freqtrade, zenbot and socvktrade ... none of these have the same feelings we got from Gekko.

@askmike Mike said in #2837 this project is not abandoned, he's just too busy to maintain these change requests, lets wait and see

thanks @hiyan ! did you see my reply ? both the kraken js file and json file looks fine to me, and paper trade going really well, just not able to run trade bot with latest Gekko.

skylinetech-team commented 4 years ago

@sanitariu I just took a look at https://github.com/IoTresor/gekko it has the same code base as the main branch here, is it ?

skylinetech-team commented 4 years ago

@askmike Hi, Mike, trade bot connection issue like this one - we'll really appreciated that you can take some moments and give some pointers, so that we all can take on and contribute fixes / changes ?

sanitariu commented 4 years ago

The same branch as here + some fixes......

skylinetech-team commented 4 years ago

The same branch as here + some fixes......

thanks @sanitariu we just tried IoTresor repository, same kraken trade bot issue found

Mike @askmike we really need your expertise and bit time on this, please help

thanks

skylinetech-team commented 4 years ago

how's everyone else with latest Gekko codebase ? no one having issues with Kraken when running trade bot mode ? @askmike

mark-sch commented 4 years ago

@skylinetech-team I am using Kraken for live trading. Most of the time it goes well but regularly some errors with sticky orders occur - hard to debug. On liquid markets like BTC or ETH with low slippage I use market taking orders now, they get filled immediately and avoid possible errors during order movement on the orderbook.

skylinetech-team commented 4 years ago

@skylinetech-team I am using Kraken for live trading. Most of the time it goes well but regularly some errors with sticky orders occur - hard to debug. On liquid markets like BTC or ETH with low slippage I use market taking orders now, they get filled immediately and avoid possible errors during order movement on the orderbook.

Thanks @mark-sch which version Gekko are you running ? With the latest Gekko, I don’t think trade bot option With Kraken would work at all - I got the errors above right after starting trade bot with Kraken.

Are you sure you are running the latest Gekko or you are at an older Gekko build ? If so which Gekko build works with Kraken when running trade bot option ?

Thanks much !

skylinetech-team commented 4 years ago

@askmike hi, Mike - could you please take a look at this issue ?

I tried on few different machines with clean installing Gekko, every time when trying to run trade bot option with Kraken, Seeing the errors above ... not able to run live trade bot with Kraken at all

Paper trade option always work perfectly on all installed instances.

Thanks !

mark-sch commented 4 years ago

@skylinetech-team During the last days I had several live trades on Kraken exchange. I use this version: https://github.com/mark-sch/gekko There are some fixes in sticky order and kraken api rate limits, you can try and compare if it addresses your issue.

skylinetech-team commented 4 years ago

@mark-sch thanks for the tips !

just tried your git repo and start running trade bot for kraken.

seeing the folloiwng errors:

2019-12-28 17:24 Gekko 2019-12-28-17-24-tradebot-711074948337959 started. --> POST /api/startGekko 200 7ms 2.04kb uncaughtException TypeError: Cannot read property 'enabled' of undefined at Object. (/home/marc/skyline_dev/gekko3300/plugins/trader/trader.js:12:48) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at load (/home/marc/skyline_dev/gekko3300/core/pluginUtil.js:103:25) at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1156:9 at replenish (/home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1030:17) at iterateeCallback (/home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1015:17) at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:988:16 at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1158:13 at load (/home/marc/skyline_dev/gekko3300/core/pluginUtil.js:81:14) at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1156:9 at replenish (/home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1030:17) at iterateeCallback (/home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1015:17) at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:988:16 at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1158:13 at load (/home/marc/skyline_dev/gekko3300/core/pluginUtil.js:81:14) at /home/marc/skyline_dev/gekko3300/node_modules/async/dist/async.js:1156:9 RECEIVED ERROR IN GEKKO INSTANCE 2019-12-28-17-24-tradebot-711074948337959

mark-sch commented 4 years ago

@skylinetech-team How do you start gekko, do you specify a valid config file? I suggest to test with command line gekko (not Web UI)

skylinetech-team commented 4 years ago

@mark-sch OK, we tried web UI - this is the main reason for us to use Gekko as platform - are you able to use Gekko Web UI to run trade bot with Kraken ?

just followed "Get Started" section on your git repo, ran back test command line with sample config, getting the following errors:

2019-12-28 20:15:12 (DEBUG): *** Requested 7200 minutes of warmup history data, so reading db since 2017-12-26T22:00:00Z UTC and start backtest at 2018-01-01T00:00:00+02:00 UTC 2019-12-28 20:15:12 (INFO): Unable to connect to PostgreSQL db. Exit.

Gekko encountered an error and can't continue

Error:

{ Error: connect ECONNREFUSED 127.0.0.1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 } '\n\n'

Meta debug info:

Green Gekko version: v2020.0.68.282 Nodejs version: v10.15.2

mark-sch commented 4 years ago

@skylinetech-team The sample config expects a PostgreSQL db server running on port 5432. You can test with your config and strategy. But for serious live trading I suggest to use PostgreSQL and CLI version for full functionality.

skylinetech-team commented 4 years ago

thanks @mark-sch were you able to run Gekko Web UI to start trade bot with Kraken ? we still seeing same issues when starting trade bot with Kraken with Gekko Web UI

for the sample config:

connectionString: 'postgres://gekkodbuser:1234@localhost:5432', // if default port

we manually added "gekkodbuser" with password set to 1234, still seeing issues below:

Error:

{ error: password authentication failed for user "gekkodbuser" at Connection.parseE (/home/marc/skyline_dev/gekko3300/node_modules/pg/lib/connection.js:555:11) at Connection.parseMessage (/home/marc/skyline_dev/gekko3300/node_modules/pg/lib/connection.js:380:19) at Socket. (/home/marc/skyline_dev/gekko3300/node_modules/pg/lib/connection.js:120:22) at Socket.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12) at readableAddChunk (_stream_readable.js:265:11) at Socket.Readable.push (_stream_readable.js:220:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) name: 'error',

skylinetech-team commented 4 years ago

we tried restarted the ubuntu box - now the DB error is gone, we tried couple of different strategies with config files to import and back test.

just to note: from import and back test point of view, there's no any obvious difference between the main gekko and green gekko.

notice the same gekko web UI errors when running trade bots with kraken - on both main gekko and green gekko.

would appreciate that your guys can take the gekko web UI issues when running trade bots with kraken through gekko web UI. @askmike @mark-sch

skylinetech-team commented 4 years ago

Happy 2020 everyone !

skylinetech-team commented 4 years ago

@mark-sch Hi, for running kraken trade bot with config file - we saw the following issues:

2020-01-01 10:57:36 (INFO): Trading Advisor 2020-01-01 10:57:36 (INFO): Calculate trading advice 2020-01-01 10:57:36 (INFO): Using the strategy: sky_00103 2020-01-01 10:57:37 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-01 10:57:37 (INFO):

2020-01-01 10:57:37 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-01 10:57:37 (DEBUG): Fetching exchange data since 100 minutes ago

Gekko encountered an error and can't continue

Error:

Gekko tried to retrieve data since 2020-01-01 14:17:00, however kraken did not return any trades.

was this a configuration issues in our kraken trade bot config file or this is something else ? did you face this kind of issue before ?

thanks

@askmike Mike, would really appreciate that ypu can take a look at this kraken trade bot issue

we really want to get gekko web UI working with kraken - running trade bot mode

thanks everyone !

mark-sch commented 4 years ago

@skylinetech-team There must be a config issue, two hours ago an advice triggered several bot instances to go long on Kraken, ETHEUR, this went fine without issue. Which trading pair have you configured? Use the --import command line switch and import some candle data first before you run the bot. Screenshot_20200101-172023

skylinetech-team commented 4 years ago

@skylinetech-team There must be a config issue, two hours ago an advice triggered several bot instances to go long on Kraken, ETHEUR, this went fine without issue. Which trading pair have you configured? Use the --import command line switch and import some candle data first before you run the bot. Screenshot_20200101-172023

Yes, we did import 1 year worth of historical data from 2019-01-30

the currency we tried is JPY, the asset we tried is ETH, with Kraken

if JPY/ETH works fine for you on Kraken, would you mind share your config (without exposing your private information) ?

thanks !

mark-sch commented 4 years ago

@skylinetech-team Trading pair ETHJPY has nearly no volume on Kraken, you will have a lot of problems, slippage, spread, execution delay of limit orders, nearly no trade data ...try on ETHUSD or EUR market, does it work for you?

skylinetech-team commented 4 years ago

@skylinetech-team Trading pair ETHJPY has nearly no volume on Kraken, you will have a lot of problems, slippage, spread, execution delay of limit orders, nearly no trade data ...try on ETHUSD or EUR market, does it work for you?

yes, it has very few trades - seems paper trades works out fine though.

just tried your sample-eth.js config with EUR/ETH with kraken in trade bot mode, got the following error, seems the same as whats stated in this ticket:

2020-01-01 13:30:48 (INFO): Setting up Gekko in realtime mode 2020-01-01 13:30:48 (INFO): 2020-01-01 13:30:48 (INFO): Setting up: 2020-01-01 13:30:48 (INFO): Advice logger 2020-01-01 13:30:48 (INFO):
2020-01-01 13:30:48 (INFO): Setting up: 2020-01-01 13:30:48 (INFO): Trader 2020-01-01 13:30:48 (INFO): Follows the advice and create real orders. 2020-01-01 13:30:48 (DEBUG): syncing private data 2020-01-01 13:30:48 (INFO):

2020-01-01T18:30:55.279Z 'Cannot read property \'XETH\' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:245:46) at checkFn (/home/marc/skyline_dev/gekko3400/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:178:12 at response.then (/home/marc/skyline_dev/gekko3400/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:20190) UnhandledPromiseRejectionWarning: Error

mark-sch commented 4 years ago

Checkout the latest version and upload your full log to a gist. For comparison, while running the sample-eth.js config on kraken, you should see a console output like this: https://git.io/Jex0a

skylinetech-team commented 4 years ago

Checkout the latest version and upload your full log to a gist. For comparison, while running the sample-eth.js config on kraken, you should see a console output like this: https://git.io/Jex0a

we tried few times with fresh downloads in the past 2 days, so it must be the latest version

2020-01-02 09:50:41 (INFO): Setting up Gekko in realtime mode 2020-01-02 09:50:41 (INFO): 2020-01-02 09:50:41 (INFO): Setting up: 2020-01-02 09:50:41 (INFO): Advice logger 2020-01-02 09:50:41 (INFO):
2020-01-02 09:50:41 (INFO): Setting up: 2020-01-02 09:50:41 (INFO): Trader 2020-01-02 09:50:41 (INFO): Follows the advice and create real orders. 2020-01-02 09:50:42 (DEBUG): syncing private data 2020-01-02 09:50:42 (INFO):

2020-01-02T14:50:49.182Z 'Cannot read property \'XETH\' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:245:46) at checkFn (/home/marc/skyline_dev/gekko3400/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:178:12 at response.then (/home/marc/skyline_dev/gekko3400/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:8115) UnhandledPromiseRejectionWarning: Error at Object. (/home/marc/skyline_dev/gekko3400/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/marc/skyline_dev/gekko3400/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:689:30) (node:8115) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:8115) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^C

mark-sch commented 4 years ago

You probably did not work on the latest version, I updated the sample stratgy and readme file today.

mark-sch commented 4 years ago

Compare version number during startup

skylinetech-team commented 4 years ago

Compare version number during startup

(base) marc@marc-TUF-GAMING-FX504GE-FX80GE:~/skyline_dev/gekko3400$ node gekko --config ds-kraken-gbp-eth-sky-00103.js --set debug=true

~Gr€€n~


/ \ / |/ | / |/ | / | / \ /$$$$$$ |€€€€€€€€/ $$ | /$$/ $$ | /$$/ /$$$$$$ | $$ | $$/ €€ | $$ |/$$/ $$ |/$$/ $$ | $$ | $$ |/ |€€ | $$ $$< $$ $$< $$ | $$ | $$ |$$$$ |€€€€€/ $$$$$ \ $$$$$ \ $$ | $$ |
$$ _$$ |€€ |____ $$ |$$ \ $$ |$$ \ $$ _$$ | /\ `*
$$ $$/ €€ |$$ | $$ |$$ | $$ |$$ $$/ (o o)
$$$$$$/ €€€€€€€€/ $$/ $$/ $$/ $$/ $$$$$$/ -ooO--(_)--Ooo-

Gekko v2020.0.68.282
I'm gonna make you rich, Bud Fox. 

2020-01-02 11:36:44 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:36:44 (INFO): 2020-01-02 11:36:44 (INFO): Setting up: 2020-01-02 11:36:44 (INFO): Advice logger 2020-01-02 11:36:44 (INFO):
2020-01-02 11:36:44 (INFO): Setting up: 2020-01-02 11:36:44 (INFO): Trader 2020-01-02 11:36:44 (INFO): Follows the advice and create real orders. 2020-01-02 11:36:44 (DEBUG): syncing private data 2020-01-02 11:36:44 (INFO):

2020-01-02T16:36:51.725Z 'Cannot read property \'XETH\' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:245:46) at checkFn (/home/marc/skyline_dev/gekko3400/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_dev/gekko3400/exchange/wrappers/kraken.js:178:12 at response.then (/home/marc/skyline_dev/gekko3400/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:9616) UnhandledPromiseRejectionWarning: Error at Object. (/home/marc/skyline_dev/gekko3400/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/marc/skyline_dev/gekko3400/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:689:30) (node:9616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:9616) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^C

skylinetech-team commented 4 years ago

You probably did not work on the latest version, I updated the sample stratgy and readme file today.

the error is from running realtime trade bot and not related with your sample strategy, version is:

Gekko v2020.0.68.282
I'm gonna make you rich, Bud Fox. 
skylinetech-team commented 4 years ago

on mike's main gekko, seeing different errors with running real time trade bots with config file, here it is:

Gekko v0.6.8 I'm gonna make you rich, Bud Fox.

2020-01-02 11:40:45 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:40:45 (INFO): 2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Candle writer 2020-01-02 11:40:45 (INFO): Store candles in a database 2020-01-02 11:40:45 (INFO):

2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Trading Advisor 2020-01-02 11:40:45 (INFO): Calculate trading advice 2020-01-02 11:40:45 (INFO): Using the strategy: sky_00103 2020-01-02 11:40:46 (ERROR): Failed to load indicator TulipAsync 2020-01-02 11:40:46 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-02 11:40:46 (INFO):

2020-01-02 11:40:46 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-02 11:40:46 (DEBUG): Fetching exchange data since 100 minutes ago

Gekko encountered an error and can't continue

Error:

Gekko tried to retrieve data since 2020-01-02 15:00:00, however kraken did not return any trades.

Meta debug info:

Gekko version: v0.6.8 Nodejs version: v10.15.2

@askmike Mike, would really need your input on this, same config file, running for import, back test all works fine, and there's enough data imported, but when running real time trade bot with kraken, seeing the error above.

thanks !

skylinetech-team commented 4 years ago

on mike's main gekko, seeing different errors with running real time trade bots with config file, here it is:

Gekko v0.6.8 I'm gonna make you rich, Bud Fox.

2020-01-02 11:40:45 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:40:45 (INFO): 2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Candle writer 2020-01-02 11:40:45 (INFO): Store candles in a database 2020-01-02 11:40:45 (INFO):

2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Trading Advisor 2020-01-02 11:40:45 (INFO): Calculate trading advice 2020-01-02 11:40:45 (INFO): Using the strategy: sky_00103 2020-01-02 11:40:46 (ERROR): Failed to load indicator TulipAsync 2020-01-02 11:40:46 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-02 11:40:46 (INFO):

2020-01-02 11:40:46 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-02 11:40:46 (DEBUG): Fetching exchange data since 100 minutes ago

Gekko encountered an error and can't continue

Error:

Gekko tried to retrieve data since 2020-01-02 15:00:00, however kraken did not return any trades.

Meta debug info:

Gekko version: v0.6.8 Nodejs version: v10.15.2

@askmike Mike, would really need your input on this, same config file, running for import, back test all works fine, and there's enough data imported, but when running real time trade bot with kraken, seeing the error above.

thanks !

my bad, forgot copy one indicator file, after copying, the error when running real time trade bot with kraken is the same as seeing on green gekko, which is the following:

(base) marc@marc-TUF-GAMING-FX504GE-FX80GE:~/skyline_prod/gekko4002$ node gekko --config ds-tradebot-kraken-jpy-eth-sky-00103.js

______   ________  __    __  __    __   ______

/ \ / |/ | / |/ | / | / \ /$$$$$$ |$$$$$$$$/ $$ | /$$/ $$ | /$$/ /$$$$$$ | $$ | $$/ $$ | $$ |/$$/ $$ |/$$/ $$ | $$ | $$ |/ |$$ | $$ $$< $$ $$< $$ | $$ | $$ |$$$$ |$$$$$/ $$$$$ \ $$$$$ \ $$ | $$ | $$ \$$ |$$ |____ $$ |$$ \ $$ |$$ \ $$ __$$ | $$ $$/ $$ |$$ | $$ |$$ | $$ |$$ $$/ $$$$$$/ $$$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/

Gekko v0.6.8
I'm gonna make you rich, Bud Fox. 

2020-01-02 11:48:21 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:48:21 (INFO): 2020-01-02 11:48:21 (INFO): Setting up: 2020-01-02 11:48:21 (INFO): Candle writer 2020-01-02 11:48:21 (INFO): Store candles in a database 2020-01-02 11:48:21 (INFO):

2020-01-02 11:48:21 (INFO): Setting up: 2020-01-02 11:48:21 (INFO): Trading Advisor 2020-01-02 11:48:21 (INFO): Calculate trading advice 2020-01-02 11:48:21 (INFO): Using the strategy: sky_00103 2020-01-02 11:48:21 (ERROR): Failed to load indicator TalibAsync 2020-01-02 11:48:21 (ERROR): Failed to load indicator TulipAsync 2020-01-02 11:48:21 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-02 11:48:21 (INFO):

2020-01-02 11:48:21 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-02 11:48:21 (DEBUG): Fetching exchange data since 100 minutes ago 2020-01-02 11:48:22 (DEBUG): Available exchange data: 2020-01-02 11:48:22 (DEBUG): from: 1 minutes ago 2020-01-02 11:48:22 (DEBUG): to: 1 minutes ago 2020-01-02 11:48:22 (DEBUG): Unable to stitch datasets. 2020-01-02 11:48:22 (INFO): Not seeding locally available data to the trading method. 2020-01-02 11:48:22 (INFO): Setting up: 2020-01-02 11:48:22 (INFO): Advice logger 2020-01-02 11:48:22 (INFO):
2020-01-02 11:48:22 (INFO): Setting up: 2020-01-02 11:48:22 (INFO): Trader 2020-01-02 11:48:22 (INFO): Follows the advice and create real orders. 2020-01-02 11:48:22 (DEBUG): syncing private data 2020-01-02 11:48:22 (INFO):

2020-01-02T16:48:28.928Z 'Cannot read property \'XETH\' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_prod/gekko4002/exchange/wrappers/kraken.js:223:46) at checkFn (/home/marc/skyline_prod/gekko4002/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_prod/gekko4002/exchange/wrappers/kraken.js:177:12 at response.then (/home/marc/skyline_prod/gekko4002/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:10014) UnhandledPromiseRejectionWarning: Error at Object. (/home/marc/skyline_prod/gekko4002/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/marc/skyline_prod/gekko4002/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Stitcher.verifyExchange (/home/marc/skyline_prod/gekko4002/core/tools/dataStitcher.js:22:27) at Stitcher.prepareHistoricalData (/home/marc/skyline_prod/gekko4002/core/tools/dataStitcher.js:40:8) at new Actor (/home/marc/skyline_prod/gekko4002/plugins/tradingAdvisor/tradingAdvisor.js:34:14) at load (/home/marc/skyline_prod/gekko4002/core/pluginUtil.js:98:22) at /home/marc/skyline_prod/gekko4002/node_modules/async/dist/async.js:1156:9 at replenish (/home/marc/skyline_prod/gekko4002/node_modules/async/dist/async.js:1030:17) (node:10014) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:10014) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^C

@askmike @mark-sch

skylinetech-team commented 4 years ago

on mike's main gekko, seeing different errors with running real time trade bots with config file, here it is: Gekko v0.6.8 I'm gonna make you rich, Bud Fox. 2020-01-02 11:40:45 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:40:45 (INFO): 2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Candle writer 2020-01-02 11:40:45 (INFO): Store candles in a database 2020-01-02 11:40:45 (INFO): 2020-01-02 11:40:45 (INFO): Setting up: 2020-01-02 11:40:45 (INFO): Trading Advisor 2020-01-02 11:40:45 (INFO): Calculate trading advice 2020-01-02 11:40:45 (INFO): Using the strategy: sky_00103 2020-01-02 11:40:46 (ERROR): Failed to load indicator TulipAsync 2020-01-02 11:40:46 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-02 11:40:46 (INFO): 2020-01-02 11:40:46 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-02 11:40:46 (DEBUG): Fetching exchange data since 100 minutes ago Gekko encountered an error and can't continue Error: Gekko tried to retrieve data since 2020-01-02 15:00:00, however kraken did not return any trades. Meta debug info: Gekko version: v0.6.8 Nodejs version: v10.15.2 @askmike Mike, would really need your input on this, same config file, running for import, back test all works fine, and there's enough data imported, but when running real time trade bot with kraken, seeing the error above. thanks !

my bad, forgot copy one indicator file, after copying, the error when running real time trade bot with kraken is the same as seeing on green gekko, which is the following:

(base) marc@marc-TUF-GAMING-FX504GE-FX80GE:~/skyline_prod/gekko4002$ node gekko --config ds-tradebot-kraken-jpy-eth-sky-00103.js

______   ________  __    __  __    __   ______

/ \ / |/ | / |/ | / | / /$$$$$$ |$$$$$$$$/ $$ | /$$/ $$ | /$$/ /$$$$$$ | $$ | $$/ $$ | $$ |/$$/ $$ |/$$/ $$ | $$ | $$ |/ |$$ | $$ $$< $$ $$< $$ | $$ | $$ |$$$$ |$$$$$/ $$$$$ \ $$$$$ \ $$ | $$ | $$ $$ |$$ |____ $$ |$$ \ $$ |$$ \ $$ __$$ | $$ $$/ $$ |$$ | $$ |$$ | $$ |$$ $$/ $$$$$$/ $$$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/

Gekko v0.6.8
I'm gonna make you rich, Bud Fox. 

2020-01-02 11:48:21 (INFO): Setting up Gekko in realtime mode 2020-01-02 11:48:21 (INFO): 2020-01-02 11:48:21 (INFO): Setting up: 2020-01-02 11:48:21 (INFO): Candle writer 2020-01-02 11:48:21 (INFO): Store candles in a database 2020-01-02 11:48:21 (INFO):

2020-01-02 11:48:21 (INFO): Setting up: 2020-01-02 11:48:21 (INFO): Trading Advisor 2020-01-02 11:48:21 (INFO): Calculate trading advice 2020-01-02 11:48:21 (INFO): Using the strategy: sky_00103 2020-01-02 11:48:21 (ERROR): Failed to load indicator TalibAsync 2020-01-02 11:48:21 (ERROR): Failed to load indicator TulipAsync 2020-01-02 11:48:21 (INFO): The trading method requests 100 minutes of historic data. Checking availablity.. 2020-01-02 11:48:21 (INFO):

2020-01-02 11:48:21 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2020-01-02 11:48:21 (DEBUG): Fetching exchange data since 100 minutes ago 2020-01-02 11:48:22 (DEBUG): Available exchange data: 2020-01-02 11:48:22 (DEBUG): from: 1 minutes ago 2020-01-02 11:48:22 (DEBUG): to: 1 minutes ago 2020-01-02 11:48:22 (DEBUG): Unable to stitch datasets. 2020-01-02 11:48:22 (INFO): Not seeding locally available data to the trading method. 2020-01-02 11:48:22 (INFO): Setting up: 2020-01-02 11:48:22 (INFO): Advice logger 2020-01-02 11:48:22 (INFO): 2020-01-02 11:48:22 (INFO): Setting up: 2020-01-02 11:48:22 (INFO): Trader 2020-01-02 11:48:22 (INFO): Follows the advice and create real orders. 2020-01-02 11:48:22 (DEBUG): syncing private data 2020-01-02 11:48:22 (INFO):

2020-01-02T16:48:28.928Z 'Cannot read property 'XETH' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_prod/gekko4002/exchange/wrappers/kraken.js:223:46) at checkFn (/home/marc/skyline_prod/gekko4002/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_prod/gekko4002/exchange/wrappers/kraken.js:177:12 at response.then (/home/marc/skyline_prod/gekko4002/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:10014) UnhandledPromiseRejectionWarning: Error at Object. (/home/marc/skyline_prod/gekko4002/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/marc/skyline_prod/gekko4002/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Stitcher.verifyExchange (/home/marc/skyline_prod/gekko4002/core/tools/dataStitcher.js:22:27) at Stitcher.prepareHistoricalData (/home/marc/skyline_prod/gekko4002/core/tools/dataStitcher.js:40:8) at new Actor (/home/marc/skyline_prod/gekko4002/plugins/tradingAdvisor/tradingAdvisor.js:34:14) at load (/home/marc/skyline_prod/gekko4002/core/pluginUtil.js:98:22) at /home/marc/skyline_prod/gekko4002/node_modules/async/dist/async.js:1156:9 at replenish (/home/marc/skyline_prod/gekko4002/node_modules/async/dist/async.js:1030:17) (node:10014) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:10014) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^C

@askmike @mark-sch

this is when running real time trade bot with kraken through config file for JPY/ETH

skylinetech-team commented 4 years ago

@mark-sch we took a fresh clone of green gekko, and use your sample config file with sample strategy, import and back test works fine as always.

when tried real time trade bot with our kraken key / secret.

seeing the same error again, some debug lines attached below

Gekko v2020.0.68.289 I'm gonna make you rich, Bud Fox.

2020-01-02 19:17:40 (INFO): Setting up Gekko in realtime mode 2020-01-02 19:17:40 (INFO): 2020-01-02 19:17:40 (INFO): Setting up: 2020-01-02 19:17:40 (INFO): Advice logger 2020-01-02 19:17:40 (INFO):
2020-01-02 19:17:40 (INFO): Setting up: 2020-01-02 19:17:40 (INFO): Trader 2020-01-02 19:17:40 (INFO): Follows the advice and create real orders. 2020-01-02 19:17:41 (DEBUG): syncing private data 2020-01-02 19:17:41 (INFO):

2020-01-03T00:17:47.704Z 'Cannot read property \'XETH\' of undefined' TypeError: Cannot read property 'XETH' of undefined at handle (/home/marc/skyline_dev/gekko3500/exchange/wrappers/kraken.js:250:46) at checkFn (/home/marc/skyline_dev/gekko3500/exchange/exchangeUtils.js:24:16) at /home/marc/skyline_dev/gekko3500/exchange/wrappers/kraken.js:183:12 at response.then (/home/marc/skyline_dev/gekko3500/exchange/node_modules/kraken-api/kraken.js:173:23) at process._tickCallback (internal/process/next_tick.js:68:7) (node:23549) UnhandledPromiseRejectionWarning: Error at Object. (/home/marc/skyline_dev/gekko3500/exchange/exchangeErrors.js:9:27) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/marc/skyline_dev/gekko3500/exchange/exchangeChecker.js:4:16) at Module._compile (internal/modules/cjs/loader.js:689:30) (node:23549) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:23549) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ^C

jnikles commented 4 years ago

To get back to the original question: obviously it fails syncing private data from your account. While this is a bug in exchange/wrappers/kraken.js it worked for me, when I actually deposited funds into my account (no more null pointer access in the code)

askmike commented 4 years ago

I am unfortunately not maintaining this project anymore. I'm marking the whole repo as read only.

Read more here: https://medium.com/@gekkoplus/archiving-open-source-gekko-dba02e6efc7