ctubio / Krypto-trading-bot

Self-hosted crypto trading bot (automated high frequency market making) written in C++
https://127.0.0.1:3000
Other
3.37k stars 823 forks source link

Gdax - std::domain_error - what(): cannot use operator[] with number #202

Closed Jorman closed 7 years ago

Jorman commented 7 years ago

HI @ctubio I made a fresh new install and seems that this version write the reason why after some time gdax stop, sometimes after 10min sometims after 2h

Here the log, let me know I you need more data/info

K x86_64 version 0day.
17:41:53.924812 CF settings loaded from JSON file K OK.
17:41:53.929529 UI ready over HTTPS on external port 3000.
17:41:55.141194 GW Coinbase allows client IP.
17:41:55.141499 GW Coinbase:
- autoBot: yes
- pair: BTC-EUR
- minTick: 0.01000000
- minSize: 0.01000000
- makeFee: 0.00000000
- takeFee: 0.00000000
17:41:55.143573 DB /data/db/K.3.0.2.db loaded OK.
17:41:55.144771 DB loaded Quoting Parameters OK.
17:41:55.146621 DB loaded 33 historical Trades.
17:41:55.156089 DB loaded 1068 STDEV Periods.
17:41:55.157750 DB loaded EWMA Long = 3920.27747429.
17:41:55.158303 DB loaded EWMA Medium = 3917.55086168.
17:41:55.158373 DB loaded EWMA Short = 3917.55086168.
17:41:55.159012 DB loaded TBP = 0.01984963 BTC.
17:41:55.163173 Unable to calculate quote, missing fair value.
17:41:55.580447 GW Coinbase FIX success Logon.
17:41:56.169920 GW Coinbase WS Streaming book levels.
17:41:56.170277 GW Coinbase Changed quoting state to Enabled.
17:42:13.030940 1 UI currently connected, last connection was from ::ffff:5.89.144.156
17:42:13.224906 2 UI currently connected, last connection was from ::ffff:5.89.144.156
17:42:35.051760 1 UI currently connected, last disconnection was from ::ffff:5.89.144.156
17:43:01.793912 TBP 43% = 0.01990683 BTC
17:45:16.197837 TBP 43% = 0.02006675 BTC
17:47:30.290294 TBP 43% = 0.02021965 BTC
17:49:44.131588 TBP 44% = 0.02039200 BTC
17:50:31.680921 GW Coinbase TRADE BUY 0.01000000 BTC at price 3924.94000000 EUR
17:50:38.413562 TBP 44% = 0.01594620 BTC
17:50:38.538171 TBP 44% = 0.02037846 BTC
17:50:51.512116 TBP 44% = 0.02053488 BTC
17:50:53.808337 GW Coinbase TRADE SELL 0.01000000 BTC at price 3934.95000000 EUR
17:51:09.116222 TBP 44% = 0.02498898 BTC
17:51:09.240661 TBP 44% = 0.02052265 BTC
17:51:58.763941 TBP 45% = 0.02074120 BTC
17:53:05.747730 TBP 45% = 0.02097905 BTC
17:54:12.332261 TBP 46% = 0.02122164 BTC
17:55:19.771992 TBP 46% = 0.02146560 BTC
17:56:26.771038 TBP 47% = 0.02170548 BTC
17:57:34.027105 TBP 47% = 0.02193884 BTC
17:58:21.561110 GW Coinbase TRADE BUY 0.01000000 BTC at price 3939.05000000 EUR
17:58:29.194140 GW Coinbase TRADE SELL 0.01000000 BTC at price 3940.13000000 EUR
17:58:41.170008 TBP 48% = 0.02216695 BTC
17:58:49.512507 0 UI currently connected, last disconnection was from ::ffff:5.89.144.156
17:59:48.448260 TBP 48% = 0.02238501 BTC
18:00:55.607050 TBP 49% = 0.02259070 BTC
18:02:02.383524 TBP 49% = 0.02277820 BTC
18:03:09.613933 TBP 50% = 0.02295876 BTC
terminate called after throwing an instance of 'std::domain_error'
  what():  cannot use operator[] with number
18:04:07.221761 Errrror: Signal 6 Aborted (Three-Headed Monkey found).
./app/server/K(+0xa1065)[0xcaa1cae065]
./app/server/K(+0xa1399)[0xcaa1cae399]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f016b80f4b0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f016b80f428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f016b81102a]
./app/server/K(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0xcaa1e29fed]
./app/server/K(+0x195276)[0xcaa1da2276]
./app/server/K(+0x1952c1)[0xcaa1da22c1]
./app/server/K(+0x217b7e)[0xcaa1e24b7e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f016ce9e6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f016b8e13dd]

Yikes!
please copy and paste the error above into a new github issue (noworry for duplicates).
If you agree, go to https://github.com/ctubio/Krypto-trading-bot/issues/new

18:04:10.237666 GW Coinbase Attempting to cancel all open orders, please wait..
18:04:10.471666 GW Coinbase cancell all open orders OK.
18:04:10.471772 K exit code 1.
twilsoncodes commented 7 years ago

I also see this error after running on gdax for some period of time (normally a couple of hours)

terminate called after throwing an instance of 'std::domain_error' what(): cannot use operator[] with number 02:29:58.666304 Errrror: Signal 6 Aborted (Three-Headed Monkey found).

Yikes! please copy and paste the error above into a new github issue (noworry for duplicates). If you agree, go to https://github.com/ctubio/Krypto-trading-bot/issues/new

./app/server/K(+0x38ae5)[0x5644a9953ae5] ./app/server/K(+0x38e19)[0x5644a9953e19] /lib/x86_64-linux-gnu/libc.so.6(+0x33030)[0x7f890d959030] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f890d958fcf] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f890d95a3fa] ./app/server/K(+0x2c095d)[0x5644a9bdb95d] ./app/server/K(+0x238be6)[0x5644a9b53be6] ./app/server/K(+0x238c31)[0x5644a9b53c31] ./app/server/K(+0x2bb4ee)[0x5644a9bd64ee] /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7f890dccc494] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f890da0eaff] 02:30:01.675819 GW Coinbase Attempting to cancel all open orders, please wait.. 02:30:01.764489 GW Coinbase cancell all open orders OK. 02:30:01.764917 K exit code 1. error: Forever detected script exited with code: 1

./app/server/K(+0x38ae5)[0x5644a9953ae5] ./app/server/K(+0x38e19)[0x5644a9953e19]

Jorman commented 7 years ago

Yep, only on gdax, on bitfinex works all night without problems.

Maybe is only a little problem on gdax, maybe a math return that make crash the bot

Il 08 set 2017 8:58 AM, "twingotwango" notifications@github.com ha scritto:

I also see this error after running on gdax for some period of time (normally a couple of hours)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ctubio/Krypto-trading-bot/issues/202#issuecomment-328017164, or mute the thread https://github.com/notifications/unsubscribe-auth/AE9oFLnn5c8ER0HceSz2I4L629FoOIuyks5sgOWSgaJpZM4POz-O .