An authentication token must be requested via this REST API endpoint in order to connect to and authenticate with our Websockets API. The token should be used within 15 minutes of creation, but it does not expire once a successful Websockets connection and private subscription has been made and is maintained.
API Key Permissions Required: WebSocket interface - On
curl --request POST \
--url https://api.kraken.com/0/private/GetWebSocketsToken \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828436
}
'{
"error": [],
"result": {
"token": "1Dwc4lzSwNWOAwkMdqhssNNFhs1ed606d1WcF3XfEMw",
"expires": 900
}
}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.
The "API-Key" header should contain your API key.
Authenticated requests should be signed with the "API-Sign" header, using a signature generated with your private key, nonce, encoded payload, and URI path.
Nonce used in construction of API-Sign header
curl --request POST \
--url https://api.kraken.com/0/private/GetWebSocketsToken \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828436
}
'{
"error": [],
"result": {
"token": "1Dwc4lzSwNWOAwkMdqhssNNFhs1ed606d1WcF3XfEMw",
"expires": 900
}
}