> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xo.market/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user orders

> List the caller's open orders, paginated.



## OpenAPI

````yaml /api-reference/openapi.yaml get /orders
openapi: 3.0.3
info:
  title: XO Orderbook API
  description: |
    Public REST surface of the XO CLOB API.

    XO mainnet chain id is `3223`. The EIP-712 order domain is
    `XO Market CLOB` with `verifyingContract` set to the
    [CTF Exchange](/) address. See
    [Smart accounts](../guides/smart-accounts) for the smart-account
    identity model and ERC-1271 order signing.

    Wire conventions:
      * Prices are trimmed decimal strings (e.g. `"0.5"`, `"0.555"`).
      * Sizes are decimal-string integers in human shares.
      * Timestamps in trade and book responses are stringified Unix
        seconds / milliseconds (the SDK uses `TimestampSeconds<String>`
        / `TimestampMilliSeconds<String>`).
      * Token IDs are decimal U256 strings; condition IDs are
        `0x`-prefixed 32-byte hex.
  version: 1.0.0
  contact:
    name: XO Market
    url: https://beta.xo.market
servers:
  - url: https://orderbooks.xo.market
    description: Mainnet (XO chain id 3223)
security: []
tags:
  - name: Authentication
    description: >-
      Create and manage API keys. The L1 ClobAuth EIP-712 flow mints HMAC
      credentials that authenticate every other private request.
  - name: Market Data
    description: >-
      Public reads for books, prices, midpoints, spreads, last trades, and price
      history. Also includes server time and per-token configuration.
  - name: Markets
    description: >-
      Discovery for tradable markets, including pagination and SDK-compatible
      simplified shapes.
  - name: Trade
    description: Place, cancel, and inspect orders and trades for the authenticated maker.
  - name: Account
    description: Maker balance, allowance, positions, and claimable settled positions.
paths:
  /orders:
    get:
      tags:
        - Trade
      summary: Get user orders
      description: List the caller's open orders, paginated.
      parameters:
        - in: query
          name: market
          schema:
            type: string
        - in: query
          name: asset_id
          schema:
            type: string
        - in: query
          name: id
          schema:
            type: integer
        - in: query
          name: address
          schema:
            type: string
          description: Maker address filter
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: next_cursor
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersPage'
              examples:
                populated:
                  summary: caller has two resting orders (illustrative)
                  value:
                    limit: 100
                    count: 2
                    next_cursor: LTE=
                    data:
                      - id: '101'
                        market: >-
                          0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb
                        asset_id: >-
                          26516164265702901957933644848127860370782874751279270726689263951695181556943
                        outcome: 'Yes'
                        side: BUY
                        price: '0.547'
                        original_size: '100000000'
                        size_matched: '0'
                        status: live
                        created_at: 1779355800
                        order_hash: >-
                          0x0011223344556677889900aabbccddeeff00112233445566778899aabbccddee
                        maker_address: '0xCAFE000000000000000000000000000000000A11'
                        owner: 346629a1-8226-5a85-823f-3a25ae818e10
                        expiration: '0'
                        order_type: GTC
                      - id: '102'
                        market: >-
                          0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb
                        asset_id: >-
                          26516164265702901957933644848127860370782874751279270726689263951695181556943
                        outcome: 'Yes'
                        side: SELL
                        price: '0.560'
                        original_size: '50000000'
                        size_matched: '0'
                        status: live
                        created_at: 1779355805
                        order_hash: >-
                          0x1122334455667788990011223344556677889900aabbccddeeff112233445566
                        maker_address: '0xCAFE000000000000000000000000000000000A11'
                        owner: 346629a1-8226-5a85-823f-3a25ae818e10
                        expiration: '0'
                        order_type: GTC
                no_open_orders:
                  summary: caller has no resting orders
                  value:
                    limit: 100
                    count: 0
                    next_cursor: LTE=
                    data: []
        '401':
          $ref: '#/components/responses/Error401'
      security:
        - L2HMAC: []
        - {}
      x-codeSamples:
        - lang: Rust
          label: xo-orderbook-client-rs
          source: |
            // Requires an authenticated client.
            use xo_orderbook_client::orderbook::types::request::OrdersRequest;

            let page = client.orders(&OrdersRequest::default(), None).await?;
            for o in &page.data {
                println!("{} {} @ {} ({}/{})", o.id, o.side, o.price, o.size_matched, o.original_size);
            }
components:
  schemas:
    OrdersPage:
      type: object
      required:
        - limit
        - count
        - next_cursor
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OpenOrder'
        next_cursor:
          type: string
          description: |
            Base64-encoded offset cursor. `"LTE="` = end of stream
            (canonical CLOB sentinel). NOT nullable.
        count:
          type: integer
        limit:
          type: integer
    OpenOrder:
      type: object
      required:
        - id
        - market
        - asset_id
        - outcome
        - side
        - price
        - original_size
        - size_matched
        - status
        - created_at
        - order_hash
        - maker_address
        - owner
        - expiration
        - order_type
      properties:
        id:
          type: string
          description: |
            Numeric order id, serialised as a string for SDK
            compatibility (`py-clob-client` reads `id` as `str`).
        market:
          type: string
          description: conditionId
        asset_id:
          type: string
          description: |
            Decimal U256 token id (the canonical CLOB `asset_id`).
            Empty string when the gateway has no MarketInfo registered
            for the order's market.
        outcome:
          type: string
          enum:
            - 'Yes'
            - 'No'
        side:
          type: string
          enum:
            - BUY
            - SELL
        price:
          type: string
          description: Trimmed decimal (signed-order price).
        original_size:
          type: string
          description: Signed `makerAmount`/`takerAmount` converted to human shares.
        size_matched:
          type: string
          description: Cumulative fills so far, human shares.
        status:
          type: string
          enum:
            - live
            - delayed
        created_at:
          type: integer
          format: int64
          description: Unix seconds, bare integer (NOT stringified).
        order_hash:
          type: string
          description: 0x-prefixed keccak256 of the EIP-712 typed-data digest.
        maker_address:
          type: string
          description: Wallet address (0x-prefixed hex) that placed the order.
        owner:
          type: string
          format: uuid
          description: |
            UUIDv5 of the authenticated owner (deterministic from
            `maker_address` via XO_WALLET_OWNER_NAMESPACE). Stable across
            sessions — integrators can pre-compute the mapping.
        expiration:
          type: string
          description: Unix seconds as decimal string. `"0"` = no expiry (GTC).
        order_type:
          type: string
          enum:
            - GTC
            - GTD
            - FOK
            - FAK
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    Error401:
      description: |
        Authentication failure. L1 ClobAuth (wallet) or L2 HMAC (API key)
        headers were missing, malformed, expired, or did not match the
        requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            l1_required:
              summary: L1 ClobAuth headers missing
              value:
                error: L1 ClobAuth headers required
            l2_required:
              summary: HMAC credentials missing
              value:
                error: HMAC L2 credentials required
            address_mismatch:
              summary: L1-recovered address does not match request
              value:
                error: L1 auth address does not match request address
  securitySchemes:
    L2HMAC:
      type: apiKey
      in: header
      name: XO_API_KEY
      description: >-
        L2 HMAC request signature. See
        [Authentication](/api-reference/authentication).

````