Skip to main content

Endpoint

Keeping the connection alive

Send a ping request at least every 60 seconds to keep the connection open. See the sample implementation for reference.

Snapshots and updates

Most feeds send a snapshot of the current state first, followed by real-time incremental updates.

Authentication

Private feeds require a signed challenge. The process:
  1. Connect to the WebSocket endpoint.
  2. Send a request to obtain a challenge (using your api_key).
  3. Sign the challenge with your api_secret (see Sign challenge below).
  4. Include both original_challenge and signed_challenge in every subscribe/unsubscribe message for private feeds.

Sign challenge

Signing steps

Given a challenge string:
  1. Hash the challenge with SHA-256
  2. Base64-decode your api_secret
  3. Hash the result of step 1 with the result of step 2 using HMAC-SHA-512
  4. Base64-encode the result of step 3
The result of step 4 is the signed_challenge.

Example

The challenge is a UUID string.

Subscribe request

For private feeds, include the challenge fields: