Kraken Earn API

Staking and yield allocation endpoints

OpenAPI Specification

kraken-earn-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Kraken Futures REST Account Earn 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: Earn
  description: Staking and yield allocation endpoints
paths:
  /0/private/Earn/Allocate:
    post:
      operationId: allocateEarnFunds
      summary: Kraken Allocate Earn Funds
      description: Allocates the requested amount of an asset to a Kraken Earn strategy.
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EarnAllocateRequest'
            examples:
              allocateEarnFundsRequestExample:
                summary: Default allocateEarnFunds request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  amount: '0.01'
                  strategy_id: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Allocation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnSimpleResponse'
              examples:
                allocateEarnFunds200Example:
                  summary: Default allocateEarnFunds 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Earn/Deallocate:
    post:
      operationId: deallocateEarnFunds
      summary: Kraken Deallocate Earn Funds
      description: Removes the requested amount from an Earn strategy and returns funds to the trading balance once bonding/unbonding completes.
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EarnAllocateRequest'
            examples:
              deallocateEarnFundsRequestExample:
                summary: Default deallocateEarnFunds request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  amount: '0.01'
                  strategy_id: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Deallocation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnSimpleResponse'
              examples:
                deallocateEarnFunds200Example:
                  summary: Default deallocateEarnFunds 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Earn/AllocateStatus:
    post:
      operationId: getEarnAllocateStatus
      summary: Kraken Get Earn Allocate Status
      description: Returns the in-flight status of the last Allocate call for a strategy.
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EarnStrategyScopedRequest'
            examples:
              getEarnAllocateStatusRequestExample:
                summary: Default getEarnAllocateStatus request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  strategy_id: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Allocate status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnStatusResponse'
              examples:
                getEarnAllocateStatus200Example:
                  summary: Default getEarnAllocateStatus 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Earn/DeallocateStatus:
    post:
      operationId: getEarnDeallocateStatus
      summary: Kraken Get Earn Deallocate Status
      description: Returns the in-flight status of the last Deallocate call for a strategy.
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EarnStrategyScopedRequest'
            examples:
              getEarnDeallocateStatusRequestExample:
                summary: Default getEarnDeallocateStatus request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  strategy_id: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Deallocate status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnStatusResponse'
              examples:
                getEarnDeallocateStatus200Example:
                  summary: Default getEarnDeallocateStatus 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Earn/Strategies:
    post:
      operationId: listEarnStrategies
      summary: Kraken List Earn Strategies
      description: Returns the catalog of Earn strategies available to the account (lockup periods, APR ranges, asset).
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EarnStrategiesRequest'
            examples:
              listEarnStrategiesRequestExample:
                summary: Default listEarnStrategies request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  asset: XBT
                  limit: 1
                  lock_type: []
                  cursor: string
                  ascending: true
      responses:
        '200':
          description: Strategy catalog
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnStrategiesResponse'
              examples:
                listEarnStrategies200Example:
                  summary: Default listEarnStrategies 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Earn/Allocations:
    post:
      operationId: listEarnAllocations
      summary: Kraken List Earn Allocations
      description: Returns the current Earn allocations for the account, including bonded, allocated, and rewards balances.
      tags:
      - Earn
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/NoncedRequest'
            examples:
              listEarnAllocationsRequestExample:
                summary: Default listEarnAllocations request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
      responses:
        '200':
          description: Allocations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnAllocationsResponse'
              examples:
                listEarnAllocations200Example:
                  summary: Default listEarnAllocations 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    EarnStatusResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              pending:
                type: boolean
                example: true
            example: {}
    EarnStrategy:
      type: object
      properties:
        id:
          type: string
          example: OQCLML-BW3P3-BUCMWZ
        asset:
          type: string
          example: XBT
        lock_type:
          type: object
          properties:
            type:
              type: string
              example: buy
            bonding_period:
              type: integer
              example: 1
            unbonding_period:
              type: integer
              example: 1
            payout_frequency:
              type: integer
              example: 1
          example: {}
        apr_estimate:
          type: object
          properties:
            low:
              type: string
              example: string
            high:
              type: string
              example: string
          example: {}
        user_min_allocation:
          type: string
          example: string
        user_cap:
          type: string
          example: string
        allocation_fee:
          type: string
          example: string
        deallocation_fee:
          type: string
          example: string
        auto_compound:
          type: object
          properties:
            type:
              type: string
              example: buy
            default:
              type: boolean
              example: true
          example: {}
        yield_source:
          type: object
          properties:
            type:
              type: string
              example: buy
          example: {}
        can_allocate:
          type: boolean
          example: true
        can_deallocate:
          type: boolean
          example: true
    EarnStrategiesResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              items:
                type: array
                items:
                  $ref: '#/components/schemas/EarnStrategy'
                example: []
              next_cursor:
                type: string
                example: string
            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
    EarnSimpleResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: boolean
            example: true
    EarnStrategiesRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          asset:
            type: string
            example: XBT
          limit:
            type: integer
            example: 1
          lock_type:
            type: array
            items:
              type: string
              enum:
              - bonded
              - flex
              - timed
              - instant
            example: []
          cursor:
            type: string
            example: string
          ascending:
            type: boolean
            example: true
    EarnAllocateRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        required:
        - amount
        - strategy_id
        properties:
          amount:
            type: string
            example: '0.01'
          strategy_id:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
    EarnStrategyScopedRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        required:
        - strategy_id
        properties:
          strategy_id:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
    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'
    EarnAllocationsResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              converted_asset:
                type: string
                example: XBT
              total_allocated:
                type: string
                example: string
              total_rewarded:
                type: string
                example: string
              items:
                type: array
                items:
                  type: object
                  properties:
                    strategy_id:
                      type: string
                      example: OQCLML-BW3P3-BUCMWZ
                    native_asset:
                      type: string
                      example: XBT
                    amount_allocated:
                      type: object
                      properties:
                        bonding:
                          type: object
                          example: {}
                        unbonding:
                          type: object
                          example: {}
                        allocated:
                          type: object
                          example: {}
                        total:
                          type: object
                          properties:
                            native:
                              type: string
                              example: string
                            converted:
                              type: string
                              example: string
                          example: {}
                      example: {}
                    total_rewarded:
                      type: object
                      properties:
                        native:
                          type: string
                          example: string
                        converted:
                          type: string
                          example: string
                      example: {}
                example: []
            example: {}
  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.'