failed to subscribe
Knaackee opened this issue · comments
Denis Knaack commented
At first, thanks for the great work.
I am getting the following error. Any idea ?
[
'Websocket connected',
{
category: 'bybit-ws',
wsKey: 'v5Private',
testnet: true,
market: 'v5'
}
]
connection opened open: v5Private
[ 'Sending auth request...' ]
[
"Getting auth'd request params",
{ category: 'bybit-ws', wsKey: 'v5Private' }
]
[
'Subscribing to topics',
{ category: 'bybit-ws', wsKey: 'v5Private', topics: [ 'position' ] }
]
"(position) failed to subscribe"
Tiago commented
Hi @Knaackee - you have testnet set to true, are your API keys for testnet?
Most of the time it's something wrong with your API keys. The WS client also emits error events for something like this, there might be more information there on the failure. Recommend adding an error event listener if you haven't already:
wsClient.on('error', (data) => {
console.error('ws exception: ', data);
});
Denis Knaack commented
I had the wrong keys. Thank you!