Blockchain.com Exchange REST API

REST trading API for the Blockchain.com Exchange — public market data (symbols, tickers, L2/L3 order books) and authenticated trading (orders, trades, fills, fees), accounts and payments (balances, deposits, withdrawals, whitelist beneficiaries). Authenticates with an `X-API-Token` header.

OpenAPI Specification

blockchain-exchange-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Blockchain.com Exchange REST API
  description: |
    REST API for the Blockchain.com Exchange (`api.blockchain.com/v3/exchange`). Covers market
    data (symbols, tickers, L2/L3 order books), trading (orders, trades, fills, fees) and payments
    (accounts/balances, deposits, withdrawals, whitelist). Authenticated endpoints require an
    `X-API-Token` header carrying the user's API key.

    Generated from https://exchange.blockchain.com/api/ and the upstream Slate documentation in
    https://github.com/blockchain/docs-exchange-api (archived) plus the live REST surface at
    https://api.blockchain.com/v3/exchange.
  version: '3.0.0'
  contact:
    name: Blockchain.com Exchange
    url: https://exchange.blockchain.com
  license:
    name: Proprietary
    url: https://www.blockchain.com/legal/terms
  x-generated-from: documentation
  x-last-validated: '2026-05-30'

servers:
- url: https://api.blockchain.com/v3/exchange
  description: Blockchain.com Exchange v3 production host.

tags:
- name: Market Data
  description: Public market data — symbols, tickers, order books.
- name: Trading
  description: Authenticated order management and trade history.
- name: Payments
  description: Authenticated account balances, deposits, withdrawals, beneficiaries.

security:
- ApiToken: []

paths:

  # --------------------------------------------------------------
  # MARKET DATA (public)
  # --------------------------------------------------------------

  /symbols:
    get:
      operationId: listSymbols
      summary: Blockchain.com List Trading Symbols
      description: Returns the full set of trading symbols and their metadata.
      tags: [Market Data]
      security: []
      responses:
        '200':
          description: Map of symbol code to symbol metadata.
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/Symbol'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /symbols/{symbol}:
    get:
      operationId: getSymbol
      summary: Blockchain.com Get a Single Symbol
      description: Returns metadata for a specific trading symbol.
      tags: [Market Data]
      security: []
      parameters:
      - $ref: '#/components/parameters/SymbolPath'
      responses:
        '200':
          description: Symbol metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Symbol'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /tickers:
    get:
      operationId: listTickers
      summary: Blockchain.com List Tickers
      description: Returns current price and 24-hour metrics for all trading pairs.
      tags: [Market Data]
      security: []
      responses:
        '200':
          description: Array of tickers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Ticker'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /tickers/{symbol}:
    get:
      operationId: getTicker
      summary: Blockchain.com Get a Single Ticker
      description: Returns the current price and 24-hour metrics for one trading pair.
      tags: [Market Data]
      security: []
      parameters:
      - $ref: '#/components/parameters/SymbolPath'
      responses:
        '200':
          description: Single ticker.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticker'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /l2/{symbol}:
    get:
      operationId: getL2OrderBook
      summary: Blockchain.com Get Level-2 Order Book
      description: Returns the aggregated price-level order book for a symbol.
      tags: [Market Data]
      security: []
      parameters:
      - $ref: '#/components/parameters/SymbolPath'
      responses:
        '200':
          description: L2 order book.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderBook'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /l3/{symbol}:
    get:
      operationId: getL3OrderBook
      summary: Blockchain.com Get Level-3 Order Book
      description: Returns the full per-order book for a symbol.
      tags: [Market Data]
      security: []
      parameters:
      - $ref: '#/components/parameters/SymbolPath'
      responses:
        '200':
          description: L3 order book.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderBook'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  # --------------------------------------------------------------
  # TRADING (authenticated)
  # --------------------------------------------------------------

  /fees:
    get:
      operationId: getFees
      summary: Blockchain.com Get Maker/taker Fees
      description: Returns the current maker and taker fee rates for the authenticated user.
      tags: [Trading]
      responses:
        '200':
          description: Fee schedule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Fees'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /orders:
    get:
      operationId: listOrders
      summary: Blockchain.com List Orders
      description: Returns live and historic orders filtered by symbol, status, and time range.
      tags: [Trading]
      parameters:
      - name: symbol
        in: query
        description: Trading symbol filter.
        schema:
          type: string
      - name: from
        in: query
        description: Filter by orders created on or after this Unix timestamp (ms).
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        description: Filter by orders created on or before this Unix timestamp (ms).
        schema:
          type: integer
          format: int64
      - name: status
        in: query
        description: Order status filter (e.g. `open`, `filled`, `cancelled`).
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of results to return.
        schema:
          type: integer
          default: 100
      responses:
        '200':
          description: Orders.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createOrder
      summary: Blockchain.com Create a New Order
      description: |
        Submits a new order. Supports LIMIT, MARKET, STOP, and STOPLIMIT order types.
      tags: [Trading]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '200':
          description: Order accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: cancelAllOrders
      summary: Blockchain.com Cancel All Open Orders
      description: Cancels every open order, optionally filtered by symbol.
      tags: [Trading]
      parameters:
      - name: symbol
        in: query
        description: If supplied, only cancel orders for this symbol.
        schema:
          type: string
      responses:
        '200':
          description: Cancellation accepted.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /orders/{orderId}:
    get:
      operationId: getOrder
      summary: Blockchain.com Get a Single Order
      description: Returns the current state of one order.
      tags: [Trading]
      parameters:
      - $ref: '#/components/parameters/OrderIdPath'
      responses:
        '200':
          description: Order detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: cancelOrder
      summary: Blockchain.com Cancel a Single Order
      description: Cancels an open order.
      tags: [Trading]
      parameters:
      - $ref: '#/components/parameters/OrderIdPath'
      responses:
        '200':
          description: Cancellation accepted.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /trades:
    get:
      operationId: listTrades
      summary: Blockchain.com List Trades
      description: Returns historical filled orders (including partial fills).
      tags: [Trading]
      parameters:
      - name: symbol
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        schema:
          type: integer
          format: int64
      - name: limit
        in: query
        schema:
          type: integer
          default: 100
      responses:
        '200':
          description: Trades.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Trade'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /fills:
    get:
      operationId: listFills
      summary: Blockchain.com List Fills
      description: Returns individual fill executions including fees.
      tags: [Trading]
      parameters:
      - name: symbol
        in: query
        schema:
          type: string
      - name: from
        in: query
        schema:
          type: integer
          format: int64
      - name: limit
        in: query
        schema:
          type: integer
          default: 100
      responses:
        '200':
          description: Fills.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Fill'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  # --------------------------------------------------------------
  # PAYMENTS (authenticated)
  # --------------------------------------------------------------

  /accounts:
    get:
      operationId: listAccounts
      summary: Blockchain.com List Account Balances
      description: Returns balances across all currencies and account types.
      tags: [Payments]
      responses:
        '200':
          description: Account balances.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Account'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /accounts/{account}/{currency}:
    get:
      operationId: getAccountBalance
      summary: Blockchain.com Get Account Balance
      description: Returns the balance for a specific account type and currency.
      tags: [Payments]
      parameters:
      - name: account
        in: path
        required: true
        description: Account type (e.g. `primary`).
        schema:
          type: string
      - name: currency
        in: path
        required: true
        description: Currency ticker (e.g. `BTC`).
        schema:
          type: string
      responses:
        '200':
          description: Account balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /deposits:
    get:
      operationId: listDeposits
      summary: Blockchain.com List Deposits
      description: Returns deposit history.
      tags: [Payments]
      parameters:
      - name: from
        in: query
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Deposits.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Deposit'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /deposits/{depositId}:
    get:
      operationId: getDeposit
      summary: Blockchain.com Get a Single Deposit
      description: Returns the status of one deposit.
      tags: [Payments]
      parameters:
      - name: depositId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Deposit detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deposit'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /deposits/{currency}/address:
    post:
      operationId: createDepositAddress
      summary: Blockchain.com Create a Deposit Address
      description: Generates a new deposit address for the specified currency.
      tags: [Payments]
      parameters:
      - name: currency
        in: path
        required: true
        description: Currency ticker (e.g. `BTC`).
        schema:
          type: string
      responses:
        '200':
          description: New deposit address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositAddress'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /withdrawals:
    get:
      operationId: listWithdrawals
      summary: Blockchain.com List Withdrawals
      description: Returns withdrawal history.
      tags: [Payments]
      parameters:
      - name: from
        in: query
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Withdrawals.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Withdrawal'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createWithdrawal
      summary: Blockchain.com Create a Withdrawal
      description: Submits a withdrawal to a whitelisted beneficiary.
      tags: [Payments]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWithdrawalRequest'
      responses:
        '200':
          description: Withdrawal accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Withdrawal'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /withdrawals/{withdrawalId}:
    get:
      operationId: getWithdrawal
      summary: Blockchain.com Get a Single Withdrawal
      description: Returns the status of one withdrawal.
      tags: [Payments]
      parameters:
      - name: withdrawalId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Withdrawal detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Withdrawal'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /whitelist:
    get:
      operationId: listWhitelist
      summary: Blockchain.com List Whitelisted Beneficiaries
      description: Returns the user's whitelisted withdrawal beneficiaries.
      tags: [Payments]
      responses:
        '200':
          description: Whitelist entries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Whitelist'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

  /whitelist/{currency}:
    get:
      operationId: listWhitelistByCurrency
      summary: Blockchain.com List Whitelist by Currency
      description: Returns the user's whitelisted beneficiaries for a specific currency.
      tags: [Payments]
      parameters:
      - name: currency
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Whitelist entries.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Beneficiary'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK

components:

  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: X-API-Token
      description: API key minted in the Exchange API settings panel; required on authenticated endpoints.

  parameters:
    SymbolPath:
      name: symbol
      in: path
      required: true
      description: Trading pair symbol (e.g. `BTC-USD`).
      schema:
        type: string
        example: BTC-USD
    OrderIdPath:
      name: orderId
      in: path
      required: true
      description: Order identifier.
      schema:
        type: string
        example: "21745988181"

  schemas:

    Symbol:
      type: object
      description: Metadata describing one trading pair on the Exchange.
      properties:
        base_currency:
          type: string
          description: Base currency ticker.
          example: BTC
        base_currency_scale:
          type: integer
          description: Decimal precision of the base currency.
          example: 8
        counter_currency:
          type: string
          description: Counter currency ticker.
          example: USD
        counter_currency_scale:
          type: integer
          description: Decimal precision of the counter currency.
          example: 2
        min_price_increment:
          type: number
          description: Smallest price increment allowed.
          example: 72525.0
        min_price_increment_scale:
          type: integer
          example: 8
        min_order_size:
          type: integer
          description: Minimum order size (in counter currency minor units).
        min_order_size_scale:
          type: integer
          example: 8
        max_order_size:
          type: integer
        max_order_size_scale:
          type: integer
          example: 8
        lot_size:
          type: integer
          description: Lot size for orders.
        lot_size_scale:
          type: integer
          example: 8
        status:
          type: string
          description: Symbol status (`open` or `close`).
          example: open
        id:
          type: integer
          description: Internal symbol identifier.
        auction_price:
          type: number
          example: 72525.0
        auction_size:
          type: number
        auction_time:
          type: integer
          format: int64
          example: 1748609400000
        imbalance:
          type: number

    Ticker:
      type: object
      description: Current price and 24-hour metrics for a single trading pair.
      properties:
        symbol:
          type: string
          example: BTC-USD
        price_24h:
          type: number
          description: 24-hour reference price.
          example: 72525.0
        volume_24h:
          type: number
          description: Trading volume over the last 24 hours.
          example: 0.5
        last_trade_price:
          type: number
          description: Most recent trade price.

          example: 72525.0
    OrderBook:
      type: object
      description: Aggregated (L2) or per-order (L3) order book for a symbol.
      properties:
        symbol:
          type: string
          example: BTC-USD
        bids:
          type: array
          items:
            $ref: '#/components/schemas/PriceLevel'
        asks:
          type: array
          items:
            $ref: '#/components/schemas/PriceLevel'

    PriceLevel:
      type: object
      description: One side of the order book at a single price.
      properties:
        px:
          type: number
          description: Price.
          example: 72525.0
        qty:
          type: number
          description: Quantity available at this price.
          example: 0.5
        num:
          type: integer
          description: Number of orders at this price (L2 only).

    Fees:
      type: object
      description: Maker/taker fee schedule.
      properties:
        makerRate:
          type: number
          description: Maker fee rate.
          example: 72525.0
        takerRate:
          type: number
          description: Taker fee rate.
          example: 72525.0
        volumeInUSD:
          type: number
          description: 30-day trading volume in USD used to compute the rate tier.

          example: 0.5
    Order:
      type: object
      description: An order submitted to the matching engine.
      properties:
        orderId:
          type: integer
          format: int64
        gwOrderId:
          type: integer
          format: int64
        clOrdId:
          type: string
          example: '21745988181'
        symbol:
          type: string
          example: BTC-USD
        ordType:
          type: string
          description: Order type — `limit`, `market`, `stop`, `stopLimit`.
        timeInForce:
          type: string
          description: Time in force — `GTC`, `IOC`, `FOK`, `GTD`.
        side:
          type: string
          description: "`buy` or `sell`."
          example: buy
        orderQty:
          type: number
          example: 0.5
        minQty:
          type: number
          example: 0.5
        cumQty:
          type: number
          example: 0.5
        price:
          type: number
          example: 72525.0
        stopPx:
          type: number
        ordStatus:
          type: string
          description: Status — `pending`, `open`, `filled`, `partial`, `cancelled`, `rejected`, `expired`.
          example: open
        expireDate:
          type: integer
        execID:
          type: string
          example: '21745988181'
        avgPx:
          type: number

    CreateOrderRequest:
      type: object
      required: [clOrdId, ordType, symbol, side, orderQty]
      description: Payload for submitting a new order.
      properties:
        clOrdId:
          type: string
          description: Client-supplied order identifier.
          example: '21745988181'
        ordType:
          type: string
          enum: [limit, market, stop, stopLimit]
          example: limit
        timeInForce:
          type: string
          enum: [GTC, IOC, FOK, GTD]
          example: GTC
        symbol:
          type: string
          example: BTC-USD
        side:
          type: string
          enum: [buy, sell]
          example: buy
        orderQty:
          type: number
          example: 0.5
        price:
          type: number
          example: 72525.0
        stopPx:
          type: number
        minQty:
          type: number
          example: 0.5
        expireDate:
          type: integer

    Trade:
      type: object
      description: A filled order or partial fill.
      properties:
        exOrdId:
          type: integer
          format: int64
        clOrdId:
          type: string
          example: '21745988181'
        symbol:
          type: string
          example: BTC-USD
        side:
          type: string
          example: buy
        price:
          type: number
          example: 72525.0
        qty:
          type: number
          example: 0.5
        fee:
          type: number
        timestamp:
          type: integer
          format: int64

          example: 1748609400000
    Fill:
      type: object
      description: A single execution leg, including fees.
      properties:
        execId:
          type: string
          example: '21745988181'
        orderId:
          type: integer
          format: int64
        symbol:
          type: string
          example: BTC-USD
        side:
          type: string
          example: buy
        price:
          type: number
          example: 72525.0
        qty:
          type: number
          example: 0.5
        fee:
          type: number
        feeCurrency:
          type: string
          example: BTC
        timestamp:
          type: integer
          format: int64

          example: 1748609400000
    Account:
      type: object
      description: Balance for a single account/currency.
      properties:
        primary:
          type: string
        name:
          type: string
          example: My Entry
        currency:
          type: string
          example: BTC
        balance:
          type: number
        available:
          type: number
        balance_local:
          type: number
        available_local:
          type: number
        rate:
          type: number
          example: 72525.0
        type:
          type: string

    Deposit:
      type: object
      description: A deposit record.
      properties:
        id:
          type: string
          example: '21745988181'
        amount:
          type: number
        amount_local:
          type: number
        currency:
          type: string
          example: BTC
        timestamp:
          type: integer
          format: int64
          example: 1748609400000
        address:
          type: string
          example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
        txHash:
          type: string
          example: 00000000000000000004f4e7a18a09b1f8e96d6fb01d9b6fce4d12cb3f8a7e21
        state:
          type: string
          description: Deposit state — `PENDING`, `CONFIRMED`, `REJECTED`.

          example: open
    DepositAddress:
      type: object
      description: A newly generated deposit address.
      properties:
        currency:
          type: string
          example: BTC
        address:
          type: string

          example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
    Withdrawal:
      type: object
      description: A withdrawal record.
      properties:
        withdrawalId:
          type: string
          example: '21745988181'
        amount:
          type: number
        currency:
          type: string
          example: BTC
        beneficiary:
          type: string
        state:
          type: string
          description: Withdrawal state — `NONE`, `IN_PROGRESS`, `COMPLETE`, `REJECTED`.
          example: open
        timestamp:
          type: integer
          format: int64
          example: 1748609400000
        fee:
          type: number

    CreateWithdrawalRequest:
      type: object
      required: [currency, amount, beneficiary]
      description: Payload for submitting a withdrawal.
      properties:
        currency:
          type: string
          description: Currency ticker.
          example: BTC
        amount:
          type: string
          description: Amount to withdraw (decimal string).
          example: "0.0001"
        beneficiary:
          type: string
          description: Beneficiary id (from `/whitelist`).

    Beneficiary:
      type: object
      description: A whitelisted withdrawal destination.
      properties:
        id:
          type: string
          example: '21745988181'
        address:
          type: string
          example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
        currency:
          type: string
          example: BTC
        state:
          type: string
          description: Beneficiary state — `ACTIVE`, `PENDING`, `REJECTED`.
          example: open
        name:
          type: string
          example: My Entry
        whitelisted:
          type: boolean
          example: true
        fiat:
          type: boolean
          example: true
        agent:
          type: object
          description: Routing details for fiat beneficiaries.
          properties:
            account:
              type: string
            address:
              type: string
            code:
              type: string
            country:
              type: string
            name:
              type: string
            recipient:
              type: string
            routingNumber:
              type: string

    Whitelist:
      type: object
      description: Whitelist response listing capabilities and active beneficiaries.
      properties:
        capabilities:
          type: array
          items:
            $ref: '#/components/schemas/WhitelistCapability'
        enabled:
          type: boolean
          example: true
        enabledAt:
          type: string
          format: date-time
          example: '2026-05-30T14:30:00Z'
        whitelisted:
          type: array
          items:
            $ref: '#/components/schemas/Beneficiary'

    WhitelistCapability:
      type: object
      description: Per-currency capability flags for the whitelist.
      properties:
        currency:
          type: string
          example: BTC
        address:
          type: boolean
          example: true
        xpub:
          type: boolean
          example: true
        existingBeneficiaryOnly:
          type: boolean
          example: true
        fiat:
          type: boolean
          example: true