Closed Lifestohack closed 6 years ago
Why are you connecting to localhost
? Are you running a local proxy, or was this an oversight?
Edit: Oh. It looks like you copied code from the tests
directory. Was that intentional?
@rmm5t Hi Ryan, yeah that was from test folder. I also copied the websoketserver file also. The cursur just blinks and nothing happens. Then I tried this:
const websocket = new Gdax.WebsocketClient(this.cryptocurrency,
'https://api-public.sandbox.gdax.com',
{
key: this.key,
secret: this.secret,
passphrase: this.passphrase,
},
{ channels: ['ticker'] },
);
websocket.on('message', msg => {
console.log(msg);
});
websocket.on('error', err => {
console.log(err);
});
It gives me unexpected server error(400).
It gives me unexpected server error(400).
More information is necessary.
I replaced 'https://api-public.sandbox.gdax.com', with 'wss://ws-feed.gdax.com' and it started working. Thanks.
Description: Websocket does not return anything.
Am I doing something wrong? I double checked it. If I run this from cmd line the cursor just blinks and nothing happen