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
1
const authMessage = {
2
type: 'authenticate',
3
apiKey: '<API_KEY>',
4
}
5
ws.send(JSON.stringify(authMessage))
Copied!
1
auth_message={
2
"type": "authenticate",
3
"apiKey": "<API KEY>"
4
}
5
6
await ws.send(json_dump(auth_message))
Copied!
Success
1
{
2
"type": "success",
3
"sequence": 2,
4
"timestamp": 1649898453577592461,
5
"payload": {
6
"action": "authenticate"
7
},
8
"action": "authenticate"
9
}
Copied!
Failure
1
{
2
"type": "error",
3
"sequence": 2,
4
"timestamp": 1649898453577592461,
5
"payload": {
6
"action": "authenticate"
7
},
8
"action": "authenticate"
9
}
Copied!
Copy link