Closed VictorStastra closed 7 years ago
the api key may be invalid, did you try to create a new key or to edit the permissions of the current key?
i would suggest to contact gdax support if you still get this error of invalid api key (at https://support.gdax.com/customer/portal/emails/new)
if the key is encoded in base64, the last symbols of == are part of the encoded content; removing them effectively brakes the base64 encoded content (the api key)
Thanks for your reply! I added the double == at the end of the secret, and tried it with a new API key. I now get the following log:
warn: --minUptime not set. Defaulting to: 1000ms warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms K.linux.51 DB 3.6.2 loaded OK UI ready over HTTPS on external port 3000 14:10:38.508 main Error THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END IS NEVER THE END 14:10:38.495 main Unhandled rejection! Error: Unable to connect to Coinbase, seems currently offline. Please retry once is online. at Object.
(/K/app/server/gateways/coinbase.js:520:19) at Generator.next ( ) at fulfilled (/K/app/server/gateways/coinbase.js:4:58) at process._tickCallback (internal/process/next_tick.js:109:7) Promise { Error: Unable to connect to Coinbase, seems currently offline. Please retry once is online. at Object. (/K/app/server/gateways/coinbase.js:520:19) at Generator.next ( ) at fulfilled (/K/app/server/gateways/coinbase.js:4:58) at process._tickCallback (internal/process/next_tick.js:109:7) } 14:10:40.512 main Exit code 0 error: Forever detected script exited with code: 0 error: Script restart attempt #1
I tried to fix this by running: "npm run test-stunnel" in the docker toolbox terminal (MINGW64) from the folder where my Dockerfile is. I then get the following error:
0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'test-stunnel' ] 2 info using npm@5.1.0 3 info using node@v7.10.0 4 verbose run-script [ 'pretest-stunnel', 'test-stunnel', 'posttest-stunnel' ] 5 info lifecycle K.js@3.0.0~pretest-stunnel: K.js@3.0.0 6 info lifecycle K.js@3.0.0~test-stunnel: K.js@3.0.0 7 verbose lifecycle K.js@3.0.0~test-stunnel: unsafe-perm in lifecycle true 8 verbose lifecycle K.js@3.0.0~test-stunnel: PATH: C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;E:\crypto\K\node_modules.bin;C:\Users\USER NAME\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\USER NAME\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Java\jdk1.8.0_121\bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\system32\wbem;C:\windows\system32\windowspowershell\v1.0;C:\program files\miktex 2.9\miktex\bin\x64;D:\data science\anaconda3;D:\data science\anaconda3\scripts;D:\data science\anaconda3\library\bin;C:\program files (x86)\graphviz2.38\bin;C:\users\USER NAME\appdata\local\microsoft\windowsapps;C:\adb;C:\Program Files (x86)\Skype\Phone;C:\Program Files\MATLAB\R2016b\bin;C:\Program Files\Cloud Foundry;C:\Program Files\CMake\bin;C:\Users\USER NAME.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Users\USER NAME\caffe\python;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\Users\USER NAME\AppData\Roaming\npm;C:\Program Files\nodejs;C:\Anaconda3;C:\Anaconda3\Scripts;C:\Anaconda3\Library\bin;C:\Program Files (x86)\Graphviz2.38\bin;C:\Users\USER NAME\AppData\Local\Microsoft\WindowsApps;C:\Users\USER NAME\AppData\Local\Microsoft\WindowsApps;C:\Program Files\nodejs;C:\Users\USER NAME\AppData\Roaming\npm;C:\Program Files\Docker Toolbox;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl 9 verbose lifecycle K.js@3.0.0~test-stunnel: CWD: E:\crypto\K 10 silly lifecycle K.js@3.0.0~test-stunnel: Args: [ '/d /s /c', 10 silly lifecycle 'test -z "$SKIP_STUNNEL$(ps axu | grep stunnel | grep -v grep)" && exec stunnel dist/K-stunnel.conf || :' ] 11 silly lifecycle K.js@3.0.0~test-stunnel: Returned: code: 1 signal: null 12 info lifecycle K.js@3.0.0~test-stunnel: Failed to exec test-stunnel script 13 verbose stack Error: K.js@3.0.0 test-stunnel:
test -z "$SKIP_STUNNEL$(ps axu | grep stunnel | grep -v grep)" && exec stunnel dist/K-stunnel.conf || :
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.(C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:289:16) 13 verbose stack at emitTwo (events.js:106:13) 13 verbose stack at EventEmitter.emit (events.js:194:7) 13 verbose stack at ChildProcess. (C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14) 13 verbose stack at emitTwo (events.js:106:13) 13 verbose stack at ChildProcess.emit (events.js:194:7) 13 verbose stack at maybeClose (internal/child_process.js:899:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 14 verbose pkgid K.js@3.0.0 15 verbose cwd E:\crypto\K\build 16 verbose Windows_NT 10.0.15063 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "test-stunnel" 18 verbose node v7.10.0 19 verbose npm v5.1.0 20 error code ELIFECYCLE 21 error errno 1 22 error K.js@3.0.0 test-stunnel: test -z "$SKIP_STUNNEL$(ps axu | grep stunnel | grep -v grep)" && exec stunnel dist/K-stunnel.conf || :
22 error Exit status 1 23 error Failed at the K.js@3.0.0 test-stunnel script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
I also tried to run "npm run test-stunnel" inside the container by "docker-machine ssh" and then running the command, but then I get:
-sh: npm: not found.
Hope you can help me out and thanks again!
Oh and I checked that coinbase/gdax was in fact Online when trying above. Previously I used Docker for Windows, but now trying it with Docker Toolbox, this to make sure docker is running on the docker machine 'default'.
let me first thank you guys for publishing this bot! However, I spent 2 nights getting it to work but to no avail. I keep getting the error message: "invalid API key" when trying to use the bot with GDAX. I double checked the passphrase, key and secret (with and without ==) but no luck. Also tried 2 different requested API keys for GDAX. Trying to trade ETH/EUR.
Maybe it has to do with Stunnel, however from the readme I gathered that no specific actions has to be taken for launching stunnel. I have installed stunnel on my host (windows 10) pc.
Hopefully someone can help me, thanks in advance!
Full log below:
Dockerfile: RUN apt-get install -y git sudo
Feel free to choose the branch you want to build:
RUN git clone -b master https://github.com/ctubio/Krypto-trading-bot.git K
WORKDIR K
Remove the ssl certificate (GUI accessible over plain HTTP, not recommended):
RUN npm install --unsafe-perm
EXPOSE 3000 5000
General config properties. Replace with your own exchange account information:
ENV BotIdentifier autodev_bot ENV EXCHANGE coinbase ENV TradedPair ETH/EUR ENV WebClientUsername xxxxx ENV WebClientPassword xxxx ENV WebClientListenPort 3000 ENV MatryoshkaUrl https://
Set options only for your desired EXCHANGE:
Coinbase GDAX
ENV CoinbaseRestUrl https://api-public.sandbox.gdax.com ENV CoinbaseWebsocketUrl wss://ws-feed-public.sandbox.gdax.com ENV CoinbasePassphrase xxxxxx ENV CoinbaseApiKey xxxxxxx ENV CoinbaseSecret xxxxxxx ENV CoinbaseOrderDestination Coinbase
OkCoin
ENV OkCoinWsUrl wss://real.okcoin.com:10440/websocket/okcoinapi ENV OkCoinHttpUrl https://www.okcoin.com/api/v1/ ENV OkCoinApiKey NULL ENV OkCoinSecretKey NULL ENV OkCoinOrderDestination OkCoin
Bitfinex
ENV BitfinexHttpUrl https://api.bitfinex.com/v1 ENV BitfinexWebsocketUrl wss://api.bitfinex.com/ws/2 ENV BitfinexKey NULL ENV BitfinexSecret NULL ENV BitfinexOrderDestination Bitfinex
Poloniex
ENV PoloniexHttpUrl https://poloniex.com ENV PoloniexWebsocketUrl wss://api.poloniex.com ENV PoloniexApiKey NULL ENV PoloniexSecretKey NULL ENV PoloniexOrderDestination Poloniex
Korbit
ENV KorbitHttpUrl https://api.korbit.co.kr/v1 ENV KorbitApiKey NULL ENV KorbitSecretKey NULL ENV KorbitUsername NULL ENV KorbitPassword NULL ENV KorbitOrderDestination Korbit
HitBtc
ENV HitBtcPullUrl http://demo-api.hitbtc.com ENV HitBtcOrderEntryUrl ws://demo-api.hitbtc.com:8080 ENV HitBtcMarketDataUrl ws://demo-api.hitbtc.com:80 ENV HitBtcSocketIoUrl https://demo-api.hitbtc.com:8081 ENV HitBtcApiKey NULL ENV HitBtcSecret NULL ENV HitBtcOrderDestination HitBtc
Quoting Parameters
ENV delayUI 3
CMD ["node_modules/.bin/forever", "K.js"]