Kraken WebSocket API

Endpoints that mint tokens for private WebSocket subscriptions

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /0/private/GetWebSocketsToken Get a token for private WebSocket feeds · Kraken Get WebSockets Token #
Ask an LLM
“How do I authenticate to Kraken's private WebSocket feeds?”
“How long does a WebSockets token stay valid?”
Tell an agent
Get a WebSockets token for private subscriptions.
Mint a 15-minute WebSockets token using two-factor code {otp}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kraken-websocket-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kraken-websocket-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kraken Spot REST WebSocket API
  version: 1.0.0
  description: OpenAPI description of Kraken's public Spot REST API. Covers public market data (server time, system status, asset info, ticker, OHLC, order book, recent trades, recent spreads) and the private surface (account data, trading, funding, subaccounts, Earn, WebSocket token). Generated by the API Evangelist pipeline from docs.kraken.com/api/docs/rest-api/.
  contact:
    name: Kraken API Support
    url: https://support.kraken.com/
  license:
    name: Kraken Terms of Service
    url: https://www.kraken.com/legal
  x-generated-from: documentation
  x-last-validated: '2026-05-30'
servers:
- url: https://api.kraken.com
  description: Kraken Spot REST production endpoint
- url: https://colo-london.vip-api.kraken.com
  description: Kraken Spot REST colocation endpoint (London VIP)
tags:
- name: Websocket
  description: Endpoints that mint tokens for private WebSocket subscriptions
paths:
  /0/private/GetWebSocketsToken:
    post:
      operationId: getWebSocketsToken
      summary: Kraken Get WebSockets Token
      description: Mints a short-lived (15 minute) token used to authenticate subscriptions on the private WebSocket endpoint.
      tags:
      - Websocket
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/NoncedRequest'
            examples:
              getWebSocketsTokenRequestExample:
                summary: Default getWebSocketsToken request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
      responses:
        '200':
          description: WebSocket token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketsTokenResponse'
              examples:
                getWebSocketsToken200Example:
                  summary: Default getWebSocketsToken 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    WebSocketsTokenResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              token:
                type: string
                example: string
              expires:
                type: integer
                example: 900
            example: {}
    NoncedRequest:
      type: object
      description: All private requests include an incrementing nonce. Optionally an OTP for two-factor-protected keys.
      required:
      - nonce
      properties:
        nonce:
          type: integer
          format: int64
          example: 1717000000000
        otp:
          type: string
          description: Two-factor password / OTP if the key is OTP-protected.
          example: '123456'
    BaseEnvelope:
      type: object
      properties:
        error:
          type: array
          items:
            type: string
          description: Array of error strings; empty on success.
          example: []
        result:
          description: Endpoint-specific result object.
          example: string
      required:
      - error
  securitySchemes:
    kraken_signature:
      type: apiKey
      in: header
      name: API-Key
      description: 'Kraken signs private REST requests with two headers: `API-Key` (your public API key) and `API-Sign` (HMAC-SHA512 of the URI path plus SHA256(nonce + POST body), keyed by the base64-decoded secret). All private endpoints must include an incrementing `nonce` in the POST body.'