Skip to main content

Authentication

You can authenticate yourself when subscribing to the WebSocket Feed. The benefits of authenticating are:

  • Messages (in which you are of the parties) are expanded and have more useful fields.
  • You receive private messages, such as lifecycle information about stop orders you placed.
// Authenticated feed messages add user_id and
// profile_id for messages related to your user
{
"type": "open", // "received" | "open" | "done" | "match" | "change" | "activate"
"user_id": "5844eceecf7e803e259d0365",
"profile_id": "765d1549-9660-4be2-97d4-fa2d65fa3352",
/* ... */
}

Here's an example of an authenticated subscribe request:

// Request
{
"type": "subscribe",
"product_ids": [
"BTC-USD"
],
"channels": [
"full"
],
"signature": "...",
"key": "...",
"passphrase": "...",
"timestamp": "..."
}

To authenticate, send a subscribe message as usual, and pass in fields to GET /users/self/verify, just as if you were signing a request. To get the necessary parameters, go through the same process as you would to make authenticated calls to the API.

caution

Authenticated feed messages do not increment the sequence number, which means that it is currently not possible to detect if an authenticated feed message was dropped.

Was this helpful?