Authentication
Authenticating to the WebSocket API
Private WebSocket feeds require authentication. Private WebSocket feeds include:
  1. 1.
    Orders
  2. 2.
    Balances
Authentication commands should be JSON with the following properties:
Property
Type
Command
type
string
"authenticate"
apiKey
string
"<YOU-API-KEY>"
NodeJS
Python
Example Response
const authMessage = {
type: 'authenticate',
apiKey: '<API_KEY>',
}
ws.send(JSON.stringify(authMessage))
auth_message={
"type": "authenticate",
"apiKey": "<API KEY>"
}
await ws.send(json_dump(auth_message))
Success
{
"type": "success",
"sequence": 2,
"timestamp": 1649898453577592461,
"payload": {
"action": "authenticate"
},
"action": "authenticate"
}
Failure
{
"type": "error",
"sequence": 2,
"timestamp": 1649898453577592461,
"payload": {
"action": "authenticate"
},
"action": "authenticate"
}
Copy link