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

# Check Market Data

> Load markets, market detail, orderbooks, tickers, price history, and trades.

Use the backend REST API to read market data.

| Base URL                      |
| ----------------------------- |
| `https://api.unitedmarket.ai` |

<Note>
  United Market is now live on BNB Smart Chain mainnet. We just launched — start trading on-chain prediction markets today.
</Note>

## List Markets

```bash theme={null}
curl "https://api.unitedmarket.ai/markets"
```

You can use market list responses to build discovery pages, category pages, and search results.

## Get Market Detail

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}"
```

Market detail includes public market metadata such as the question, outcomes, condition id, status, and trading information.

## Get Trading Snapshot

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}/trading"
```

Use the trading snapshot for market pages. It returns the market plus trading data clients usually need before rendering an order ticket.

## Get Orderbook

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}/orderbook"
```

Use this endpoint to load or refresh canonical orderbook state. A common pattern is:

1. Load `GET /markets/{id}/trading` when the user opens the market page.
2. Subscribe to WebSocket updates using the market `conditionId`.
3. Refetch `GET /markets/{id}/orderbook` after `orderbook:update` if local state needs to recover.

## Get Ticker

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}/ticker"
```

Ticker data includes best bid, best ask, and midpoint values for market outcomes.

## Get Price History

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}/price-history?timeframe=1d"
```

Use price history for charts and historical market views.

## Get Recent Trades

```bash theme={null}
curl "https://api.unitedmarket.ai/markets/{id}/trades?limit=20"
```

Use trades for activity feeds, fills tables, and public market history.
