Kraken WebSocket API

Endpoints that mint tokens for private WebSocket subscriptions

OpenAPI Specification

kraken-websocket-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Kraken Futures REST Account WebSocket API
  version: 3.0.0
  description: OpenAPI description of the Kraken Futures (formerly Crypto Facilities) REST API v3. Covers trading (send/edit/cancel orders, batch), market data (instruments, tickers, orderbook, history), account data (accounts, open positions, open orders, fills), transfers, account history, and charts. Generated by the API Evangelist pipeline from docs.kraken.com/api/docs/futures-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://futures.kraken.com/derivatives/api/v3
  description: Kraken Futures production REST endpoint
- url: https://demo-futures.kraken.com/derivatives/api/v3
  description: Kraken Futures demo / sandbox endpoint
- url: https://colo-london.vip.futures.kraken.com/derivatives/api/v3
  description: Kraken Futures 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:
    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'
    WebSocketsTokenResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              token:
                type: string
                example: string
              expires:
                type: integer
                example: 900
            example: {}
    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:
    futures_signature:
      type: apiKey
      in: header
      name: APIKey
      description: 'Kraken Futures signs requests with two headers: `APIKey` (public key) and `Authent` (base64 HMAC-SHA512 over `postData + nonce + endpointPath` using the SHA-256 hash of those values, then HMAC-SHA512 keyed by the base64-decoded secret). A `Nonce` header carries the incrementing nonce.'