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

# Data API Reference

> Public REST surface for market discovery, portfolio reads, and liquidity rewards (xo-backend).

The XO Data API is served by `xo-backend` on a separate host from the CLOB orderbook. Use it for market discovery (titles, categories, condition ids, outcome token ids, status), Pulse cycle metadata, unauthenticated public portfolio reads, and liquidity-rewards reads.

All REST paths use the `/api` global prefix. Real-time portfolio snapshots are available over the unauthenticated Socket.IO namespace `/portfolio-public` — see [Portfolio WebSocket](/data-api-reference/portfolio-websocket).

Liquidity-rewards routes come in two prefixes. `/public/liquidity-rewards/*` is unauthenticated. `/liquidity-rewards/*` **requires a Privy Bearer token** (`Authorization: Bearer <privy_access_token>`). See [Liquidity rewards](/data-api-reference/liquidity-rewards).

## Servers

|          | Value                               |
| -------- | ----------------------------------- |
| Base URL | `https://api-mainnet.xo.market/api` |
| Chain id | `3223`                              |

The Data API host is independent of the orderbook gateway. See the [introduction](/) for orderbook REST and WebSocket URLs.

## Wire conventions

* Pagination is page-based: `page` (1-indexed) and `take` (or `limit` for Pulse routes). Liquidity-rewards proxied lists use 0-indexed `page` and `page_size`.
* Numeric ids are integers; `conditionId` values are `0x`-prefixed 32-byte hex strings. Use `conditionId` as `marketId` on liquidity-rewards routes.
* Volume strings are decimal (USD) or WEI-encoded (token), depending on the field name (`totalVolumeInUSD` vs `totalVolume`).
* Liquidity-rewards amounts and scores are decimal strings.

## Market scope for CLOB integrations

The `/markets` endpoint accepts a `marketScope` query parameter that maps to on-chain `IXOMarketV1.MarketType` (`STANDARD=0`, `PULSE=1`, `CLOB=2`, `CLOB_PULSE=3`). When integrating against the XO CLOB orderbook, use:

* `onlyClob` — `CLOB` + `CLOB_PULSE` (orderbook markets, long-form and pulse).
* `onlyClobPulse` — `CLOB_PULSE` only (BTC 5-minute pulse).

Scopes such as `default`, `withClob`, `withPulse`, and `onlyPulse` include LMSR AMM markets that are **not** tradable through the CLOB orderbook.

## Next steps

<CardGroup cols={2}>
  <Card title="Liquidity rewards" icon="droplet" href="/data-api-reference/liquidity-rewards">
    Public discovery and Privy-authenticated `/me` reads.
  </Card>

  <Card title="Rate limits" icon="gauge-high" href="/data-api-reference/rate-limits">
    Data API REST request limits.
  </Card>

  <Card title="Portfolio WebSocket" icon="bolt" href="/data-api-reference/portfolio-websocket">
    Unauthenticated portfolio snapshot stream.
  </Card>

  <Card title="Orderbook API" icon="rectangle-list" href="/api-reference/introduction">
    CLOB REST and WebSocket reference.
  </Card>
</CardGroup>
