Closed adamrabie closed 7 years ago
Thanks for reporting, we will investigate
This error is caused when no authentication is given and auth.secret
is attempted to be coerced/created as a Buffer
. #19 fixes this issue allowing the subscribe
message to be sent with or without being signed.
How can I use the websocket authenticated?
@michelem09 Websocket Authentication can be done when creating the websocket client by passing the authentication object as the third argument like so:
var Gdax = require('gdax');
var authentication = {
secret: 'SECRET',
key: 'KEY',
passphrase: 'password'
};
var websocket = new Gdax.WebsocketClient(null, null, authentication);
websocket.on('message', function(data) { console.log(data); });
For more information on setting up authentication, checkout the API docs.
Can you please explain what's the difference between websocket authenticated and not ? Any difference on the received messages ?
Thank you
@mrstock it adds a few fields to the subscribe
message including a signature. Why it passes these I am not sure since the documents never state to do so and there is no reason I can think of to authenticate the subscribe
message.
@mihar can you shed some light on this?
It mainly expands messages that are geared towards you. We will add documentation about it soon.
When following documentation to start websocket with gdax get his error:
TypeError: must start with number, buffer, array or string
previous coinbase-exchange module doesn't have this error so i'm downgrading back to that.