Kraken Account Data API

Private endpoints returning account-scoped data

OpenAPI Specification

kraken-account-data-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Kraken Futures REST Account Account Data 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: Account Data
  description: Private endpoints returning account-scoped data
paths:
  /0/private/Balance:
    post:
      operationId: getAccountBalance
      summary: Kraken Get Account Balance
      description: Returns the asset balances held in the account.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/NoncedRequest'
            examples:
              getAccountBalanceRequestExample:
                summary: Default getAccountBalance request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
      responses:
        '200':
          description: Asset balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
              examples:
                getAccountBalance200Example:
                  summary: Default getAccountBalance 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/BalanceEx:
    post:
      operationId: getExtendedBalance
      summary: Kraken Get Extended Balance
      description: Returns asset balances with hold-trade and credit details.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/NoncedRequest'
            examples:
              getExtendedBalanceRequestExample:
                summary: Default getExtendedBalance request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
      responses:
        '200':
          description: Extended balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceExResponse'
              examples:
                getExtendedBalance200Example:
                  summary: Default getExtendedBalance 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/TradeBalance:
    post:
      operationId: getTradeBalance
      summary: Kraken Get Trade Balance
      description: Returns the trade balance for the requested asset class (margin equity, used margin, free margin, margin level).
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TradeBalanceRequest'
            examples:
              getTradeBalanceRequestExample:
                summary: Default getTradeBalance request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  asset: XBT
      responses:
        '200':
          description: Trade balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeBalanceResponse'
              examples:
                getTradeBalance200Example:
                  summary: Default getTradeBalance 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/OpenOrders:
    post:
      operationId: getOpenOrders
      summary: Kraken Get Open Orders
      description: Returns all open orders for the account, optionally including trades.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OpenOrdersRequest'
            examples:
              getOpenOrdersRequestExample:
                summary: Default getOpenOrders request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  trades: true
                  userref: 1
                  cl_ord_id: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Open orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenOrdersResponse'
              examples:
                getOpenOrders200Example:
                  summary: Default getOpenOrders 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/ClosedOrders:
    post:
      operationId: getClosedOrders
      summary: Kraken Get Closed Orders
      description: Returns the most recent 50 closed orders for the account, with pagination via offset.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ClosedOrdersRequest'
            examples:
              getClosedOrdersRequestExample:
                summary: Default getClosedOrders request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  trades: true
                  userref: 1
                  cl_ord_id: OQCLML-BW3P3-BUCMWZ
                  start: 1
                  end: 1
                  ofs: 1
                  closetime: open
      responses:
        '200':
          description: Closed orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClosedOrdersResponse'
              examples:
                getClosedOrders200Example:
                  summary: Default getClosedOrders 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/QueryOrders:
    post:
      operationId: queryOrdersInfo
      summary: Kraken Query Orders Info
      description: Returns information about the requested order IDs.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryOrdersRequest'
            examples:
              queryOrdersInfoRequestExample:
                summary: Default queryOrdersInfo request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  trades: true
                  userref: 1
                  cl_ord_id: OQCLML-BW3P3-BUCMWZ
                  txid: OQCLML-BW3P3-BUCMWZ
      responses:
        '200':
          description: Order info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOrdersResponse'
              examples:
                queryOrdersInfo200Example:
                  summary: Default queryOrdersInfo 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/TradesHistory:
    post:
      operationId: getTradesHistory
      summary: Kraken Get Trades History
      description: Returns trade history for the account, ordered most recent first.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TradesHistoryRequest'
            examples:
              getTradesHistoryRequestExample:
                summary: Default getTradesHistory request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  type: all
                  trades: true
                  start: 1
                  end: 1
                  ofs: 1
      responses:
        '200':
          description: Trades history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradesHistoryResponse'
              examples:
                getTradesHistory200Example:
                  summary: Default getTradesHistory 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/QueryTrades:
    post:
      operationId: queryTradesInfo
      summary: Kraken Query Trades Info
      description: Returns information about the requested trade IDs.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryTradesRequest'
            examples:
              queryTradesInfoRequestExample:
                summary: Default queryTradesInfo request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  txid: OQCLML-BW3P3-BUCMWZ
                  trades: true
      responses:
        '200':
          description: Trade info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryTradesResponse'
              examples:
                queryTradesInfo200Example:
                  summary: Default queryTradesInfo 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/OpenPositions:
    post:
      operationId: getOpenPositions
      summary: Kraken Get Open Positions
      description: Returns open margin positions for the account.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OpenPositionsRequest'
            examples:
              getOpenPositionsRequestExample:
                summary: Default getOpenPositions request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  txid: OQCLML-BW3P3-BUCMWZ
                  docalcs: true
                  consolidation: market
      responses:
        '200':
          description: Open positions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenPositionsResponse'
              examples:
                getOpenPositions200Example:
                  summary: Default getOpenPositions 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/Ledgers:
    post:
      operationId: getLedgersInfo
      summary: Kraken Get Ledgers Info
      description: Returns ledger entries (deposits, withdrawals, trades, fees, transfers).
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LedgersRequest'
            examples:
              getLedgersInfoRequestExample:
                summary: Default getLedgersInfo request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  asset: XBT
                  aclass: string
                  type: all
                  start: 1
                  end: 1
                  ofs: 1
      responses:
        '200':
          description: Ledger entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgersResponse'
              examples:
                getLedgersInfo200Example:
                  summary: Default getLedgersInfo 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/QueryLedgers:
    post:
      operationId: queryLedgers
      summary: Kraken Query Ledgers
      description: Returns ledger information for the requested ledger IDs.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryLedgersRequest'
            examples:
              queryLedgersRequestExample:
                summary: Default queryLedgers request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  id: OQCLML-BW3P3-BUCMWZ
                  trades: true
      responses:
        '200':
          description: Ledger info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryLedgersResponse'
              examples:
                queryLedgers200Example:
                  summary: Default queryLedgers 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /0/private/TradeVolume:
    post:
      operationId: getTradeVolume
      summary: Kraken Get Trade Volume
      description: Returns the account's 30-day trade volume and the fee tier currently applied.
      tags:
      - Account Data
      security:
      - kraken_signature: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TradeVolumeRequest'
            examples:
              getTradeVolumeRequestExample:
                summary: Default getTradeVolume request
                x-microcks-default: true
                value:
                  nonce: 1717000000000
                  otp: '123456'
                  pair: XBTUSD
                  fee-info: true
      responses:
        '200':
          description: Trade volume
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeVolumeResponse'
              examples:
                getTradeVolume200Example:
                  summary: Default getTradeVolume 200 response
                  x-microcks-default: true
                  value:
                    error: []
                    result: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    OpenOrdersRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          trades:
            type: boolean
            default: false
            example: true
          userref:
            type: integer
            example: 1
          cl_ord_id:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
    QueryOrdersResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/OrderInfo'
            example: {}
    OrderInfo:
      type: object
      properties:
        refid:
          type: string
          nullable: true
          example: OQCLML-BW3P3-BUCMWZ
        userref:
          type: integer
          nullable: true
          example: 1
        cl_ord_id:
          type: string
          nullable: true
          example: OQCLML-BW3P3-BUCMWZ
        status:
          type: string
          enum:
          - pending
          - open
          - closed
          - canceled
          - expired
          example: pending
        opentm:
          type: number
          example: 0.01
        starttm:
          type: number
          example: 0.01
        expiretm:
          type: number
          example: 0.01
        descr:
          type: object
          properties:
            pair:
              type: string
              example: XBTUSD
            type:
              type: string
              enum:
              - buy
              - sell
              example: buy
            ordertype:
              type: string
              example: limit
            price:
              type: string
              example: '0.01'
            price2:
              type: string
              example: '0.01'
            leverage:
              type: string
              example: none
            order:
              type: string
              example: string
            close:
              type: string
              example: string
          example: {}
        vol:
          type: string
          example: '0.01'
        vol_exec:
          type: string
          example: '0.01'
        cost:
          type: string
          example: '0.01'
        fee:
          type: string
          example: '0.01'
        price:
          type: string
          example: '0.01'
        stopprice:
          type: string
          example: '0.01'
        limitprice:
          type: string
          example: '0.01'
        misc:
          type: string
          example: string
        oflags:
          type: string
          example: string
        trades:
          type: array
          items:
            type: string
          example: []
    OpenOrdersResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              open:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/OrderInfo'
                example: {}
            example: {}
    ClosedOrdersRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          trades:
            type: boolean
            default: false
            example: true
          userref:
            type: integer
            example: 1
          cl_ord_id:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
          start:
            type: integer
            example: 1
          end:
            type: integer
            example: 1
          ofs:
            type: integer
            example: 1
          closetime:
            type: string
            enum:
            - open
            - close
            - both
            default: both
            example: open
    LedgersRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          asset:
            type: string
            default: all
            example: XBT
          aclass:
            type: string
            default: currency
            example: string
          type:
            type: string
            enum:
            - all
            - deposit
            - withdrawal
            - trade
            - margin
            - rollover
            - credit
            - transfer
            - settled
            - staking
            - dividend
            - sale
            - nft_rebate
            - conversion
            - allocation
            - deallocation
            - earn
            default: all
            example: all
          start:
            type: integer
            example: 1
          end:
            type: integer
            example: 1
          ofs:
            type: integer
            example: 1
    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'
    OpenPositionsRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          txid:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
          docalcs:
            type: boolean
            default: false
            example: true
          consolidation:
            type: string
            enum:
            - market
            example: market
    QueryLedgersRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        required:
        - id
        properties:
          id:
            type: string
            description: Comma-delimited list of ledger ids (up to 20).
            example: OQCLML-BW3P3-BUCMWZ
          trades:
            type: boolean
            example: true
    LedgerEntry:
      type: object
      properties:
        refid:
          type: string
          example: OQCLML-BW3P3-BUCMWZ
        time:
          type: number
          example: '2026-05-30T00:00:00Z'
        type:
          type: string
          example: buy
        subtype:
          type: string
          example: string
        aclass:
          type: string
          example: string
        asset:
          type: string
          example: XBT
        amount:
          type: string
          example: '0.01'
        fee:
          type: string
          example: '0.01'
        balance:
          type: string
          example: '0.01'
    ClosedOrdersResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              closed:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/OrderInfo'
                example: {}
              count:
                type: integer
                example: 1
            example: {}
    QueryOrdersRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        required:
        - txid
        properties:
          trades:
            type: boolean
            example: true
          userref:
            type: integer
            example: 1
          cl_ord_id:
            type: string
            example: OQCLML-BW3P3-BUCMWZ
          txid:
            type: string
            description: Comma-delimited list of txids (up to 50).
            example: OQCLML-BW3P3-BUCMWZ
    LedgersResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              ledger:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/LedgerEntry'
                example: {}
              count:
                type: integer
                example: 1
            example: {}
    TradesHistoryRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          type:
            type: string
            enum:
            - all
            - any position
            - closed position
            - closing position
            - no position
            default: all
            example: all
          trades:
            type: boolean
            example: true
          start:
            type: integer
            example: 1
          end:
            type: integer
            example: 1
          ofs:
            type: integer
            example: 1
    QueryLedgersResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/LedgerEntry'
            example: {}
    TradeBalanceRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        properties:
          asset:
            type: string
            default: ZUSD
            example: XBT
    OpenPositionsResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/Position'
            example: {}
    TradeBalanceResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              eb:
                type: string
                description: Equivalent balance
                example: string
              tb:
                type: string
                description: Trade balance
                example: string
              m:
                type: string
                description: Margin used
                example: string
              n:
                type: string
                description: Unrealized P&L
                example: string
              c:
                type: string
                description: Cost basis of positions
                example: string
              v:
                type: string
                description: Current valuation of positions
                example: string
              e:
                type: string
                description: Equity
                example: string
              mf:
                type: string
                description: Free margin
                example: string
              ml:
                type: string
                description: Margin level
                example: string
              uv:
                type: string
                description: Unexecuted value
                example: string
            example: {}
    TradeVolumeResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              currency:
                type: string
                example: string
              volume:
                type: string
                example: '0.01'
              fees:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    fee:
                      type: string
                    minfee:
                      type: string
                    maxfee:
                      type: string
                    nextfee:
                      type: string
                    nextvolume:
                      type: string
                    tiervolume:
                      type: string
                example: {}
              fees_maker:
                type: object
                additionalProperties:
                  type: object
                example: {}
            example: {}
    QueryTradesResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/TradeInfo'
            example: {}
    TradesHistoryResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            properties:
              trades:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/TradeInfo'
                example: {}
              count:
                type: integer
                example: 1
            example: {}
    Position:
      type: object
      properties:
        ordertxid:
          type: string
          example: OQCLML-BW3P3-BUCMWZ
        posstatus:
          type: string
          example: string
        pair:
          type: string
          example: XBTUSD
        time:
          type: number
          example: '2026-05-30T00:00:00Z'
        type:
          type: string
          enum:
          - buy
          - sell
          example: buy
        ordertype:
          type: string
          example: limit
        cost:
          type: string
          example: '0.01'
        fee:
          type: string
          example: '0.01'
        vol:
          type: string
          example: '0.01'
        vol_closed:
          type: string
          example: '0.01'
        margin:
          type: string
          example: '0.01'
        value:
          type: string
          example: string
        net:
          type: string
          example: string
        terms:
          type: string
          example: string
        rollovertm:
          type: string
          example: string
        misc:
          type: string
          example: string
        oflags:
          type: string
          example: string
    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
    BalanceExResponse:
      allOf:
      - $ref: '#/components/schemas/BaseEnvelope'
      - type: object
        properties:
          result:
            type: object
            additionalProperties:
              type: object
              properties:
                balance:
                  type: string
                hold_trade:
                  type: string
                credit:
                  type: string
                credit_used:
                  type: string
            example: {}
    QueryTradesRequest:
      allOf:
      - $ref: '#/components/schemas/NoncedRequest'
      - type: object
        required:
        - txid
        properties:
          t

# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kraken/refs/heads/main/openapi/kraken-account-data-api-openapi.yml