Documentation Index
Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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:- Connect to the WebSocket endpoint.
- Send a request to obtain a challenge (using your
api_key). - Sign the challenge with your
api_secret(see Sign challenge below). - Include both
original_challengeandsigned_challengein every subscribe/unsubscribe message for private feeds.
Sign challenge
Signing steps
Given achallenge string:
- Hash the challenge with SHA-256
- Base64-decode your
api_secret - Hash the result of step 1 with the result of step 2 using HMAC-SHA-512
- Base64-encode the result of step 3
signed_challenge.
Example
| Field | Value |
|---|---|
challenge | c100b894-1729-464d-ace1-52dbce11db42 |
api_secret | 7zxMEF5p/Z8l2p2U7Ghv6x14Af+Fx+92tPgUdVQ748FOIrEoT9bgT+bTRfXc5pz8na+hL/QdrCVG7bh9KpT0eMTm |
signed_challenge | 4JEpF3ix66GA2B+ooK128Ift4XQVtc137N9yeg4Kqsn9PI0Kpzbysl9M1IeCEdjg0zl00wkVqcsnG4bmnlMb3A== |