> ## 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 positions

> Get the caller's positions. `balance` is total shares held;
`reserved` is the subset earmarked against open SELL orders.
Free disposable balance is `balance - reserved`.




## OpenAPI

````yaml /api-reference/openapi.yaml get /positions
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:
  /positions:
    get:
      tags:
        - Account
      summary: Get positions
      description: |
        Get the caller's positions. `balance` is total shares held;
        `reserved` is the subset earmarked against open SELL orders.
        Free disposable balance is `balance - reserved`.
      parameters:
        - in: query
          name: address
          required: true
          schema:
            type: string
        - 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/PositionsResponse'
              examples:
                populated:
                  summary: caller holds YES and NO from a binary market (illustrative)
                  value:
                    cash_balance: '12345678'
                    positions:
                      - token_id: >-
                          26516164265702901957933644848127860370782874751279270726689263951695181556943
                        balance: '50000000'
                        reserved: '20000000'
                      - token_id: >-
                          13730057904096984444199595880113152612639388204530324084054099203558669491245
                        balance: '30000000'
                        reserved: '0'
                no_positions:
                  summary: caller has cash but no tokens
                  value:
                    cash_balance: '12345678'
                    positions: []
      x-codeSamples:
        - lang: Rust
          label: xo-orderbook-client-rs
          source: >
            // XO-only endpoint — no dedicated SDK method. Hit it directly

            // via reqwest using the same host the SDK is configured with.

            use serde::Deserialize;


            #[derive(Deserialize)]

            struct PositionsResponse {
                cash_balance: String,
                positions: Vec<Position>,
            }

            #[derive(Deserialize)]

            struct Position { token_id: String, balance: String, reserved:
            String }


            let resp: PositionsResponse = reqwest::Client::new()
                .get(format!("{}/positions", client.host()))
                .query(&[("address", "0xCAFE000000000000000000000000000000000A11")])
                .send().await?
                .json().await?;
components:
  schemas:
    PositionsResponse:
      type: object
      required:
        - cash_balance
        - positions
      properties:
        cash_balance:
          type: string
          description: >-
            USDC cash balance (micro-units), mirrors COLLATERAL
            `/balance-allowance`.
        positions:
          type: array
          items:
            $ref: '#/components/schemas/PositionEntry'
    PositionEntry:
      type: object
      required:
        - token_id
        - balance
        - reserved
      properties:
        token_id:
          type: string
          description: Decimal U256 token id.
        balance:
          type: string
          description: |
            Total position held, canonical 6-decimal micro-share units
            as a decimal string. Includes both freely-disposable shares
            and shares reserved against open SELL orders.
        reserved:
          type: string
          description: |
            Shares earmarked against open SELL orders. Effective free
            position is `balance - reserved`. Same units + format as
            `balance`.

````