To begin receiving feed messages, you must first send a subscribe message to the server indicating which channels and products to receive.

Make sure that you subscribed successfully by verifying the response's type field.

📘

identifier must be a string, not a json object.

Authentication

It is possible to authenticate yourself when subscribing to the websocket feed.

To authenticate, you send a subscribe message as usual, but you also provide request with the headers just as if you were signing a request to GET /auth/feed.

To get the necessary headers, you would go through the same process as you do to make authenticated calls to the API.

// request
{
    "command": "subscribe",
    "identifier": "{\"channel\":\"ChannelName\", \"market\":\"MARKET-NAME\"}"
}

// response
{
    "type": "confirm_subscription",
    "identifier": "{\"channel\":\"ChannelName\", \"market\":\"MARKET-NAME\"}"
}