michaelgrosner / tribeca

A high frequency, market making cryptocurrency trading platform in node.js
Other
3.99k stars 949 forks source link

Coinbase DEV environment keep connecting/disconnecting from WS #161

Open hnykda opened 7 years ago

hnykda commented 7 years ago

Hi, I am trying the dockerized version. When I run the docker-compose up with the following env file:

# General config properties. Properties with `NULL` should be replaced with your own exchange account information.
TRIBECA_MODE=dev
EXCHANGE=Coinbase
TradedPair=BTC/USD
WebClientUsername=***
WebClientPassword=***
WebClientListenPort=3000
MongoDbUrl=mongodb://tribeca-mongo:27017/tribeca

NullGatewayTick=100

CoinbaseRestUrl=https://api-public.sandbox.gdax.com
CoinbaseWebsocketUrl=wss://ws-feed-public.sandbox.gdax.com
CoinbasePassphrase=***
CoinbaseApiKey=***
CoinbaseSecret=***
CoinbaseOrderDestination=Coinbase

Tribeca seems to be disconnecting. Here is the full log:

https://gist.github.com/hnykda/f95057591300a8f67409131188857e36

ctubio commented 7 years ago

you are not very smart, are you?

your nice full log contains:

"msg":"CoinbaseApiKey = 6b7e61f5276a6580a8137fbbb539fc1d","time":"2017-08-19T16:23:21.926Z","v":0}
"msg":"CoinbaseSecret = jy78LZ3GpoHT6sq7c9MkCf7jnLH6M4PPLYFOUoSvOIPj+WX9Z/BVxuT/tUnOOuXo1Vh9iGg1GTieEQVwt+pSQA==","time":"2017-08-19T16:23:21.926Z","v":0}
"msg":"CoinbasePassphrase = seznam12","time":"2017-08-19T16:23:21.926Z","v":0}

you better revoke it asap.

hnykda commented 7 years ago

I don't really care, I thought there probably will be something like that. It's a mocked password, there are no money (it was only on sandbox) and it's on 10 minutes email + there are no info on the account. I may not be very smart, but I am not stupid. Wanted to delete it but even I don't have an access.

innocentiv commented 7 years ago

I agree, no harm when using sandbox keys (just make sure your WebClientUsername and WebClientPassword aren't used elsewhere).

I have the exact same problem using dockerized version on COINBASE DEV.

SchwiftyQC commented 6 years ago

1st. Great program MichaelGrosner :) 2nd "cannot compute a quote since no position report exists!" Issue

Without going into a tons of possible reasons this can happen, first understand you are using a low latency program. So need to have a reasonable computer to run on and good internet connection. If you believe to be in good spec, then check the logs to see if connection was accepted or if you get invalid api key, deny, timeout, etc. If you have issues there check your api and env settings again and/or firewall/isp network issues. 90% of the time that fixes the issues:)

However if you believe your API, computer, network connections are all good and your still not getting your values to show on the url, and still seeing "cannot compute a quote since no position report exists!" in the logs, then it could be computer timing:) NTP If virtual make sure your host and guest systems are in sync. Also ensure both are in sync with internet time i.e nist.time.gov

Let me know if that helps:)