---
title: "Live order book for one outcome of an event"
method: GET
path: "/api/prediction-markets/event/{source}/{slug}/orderbook"
tags: ["public-pm-data"]
---

# Live order book for one outcome of an event

`GET /api/prediction-markets/event/{source}/{slug}/orderbook`

## Request

- Base URL: `https://api.coinrithm.com`
- URL: `https://api.coinrithm.com/api/prediction-markets/event/{source}/{slug}/orderbook`
- Auth: none required

Keyless live order book for the SAME single outcome `price-history`
describes (the Yes leg of a binary market, else the first live outcome
by sort order, else the first outcome). Polymarket and Kalshi only;
other sources answer 200
with `orderBook: null`, which means "not served here", not "no
market". A thin or near-expiry market with no resting orders on
either side also answers 200 with `orderBook: null` — a valid empty
shape, not an error.

`bid`/`ask`/`midpoint`/level `price` are probabilities 0-1 (a
fraction), NOT the 0-100 scale used by `PublicPmOutcome.probability`
elsewhere in this API. This is fetch-time venue depth, not an
executable quote or a tradability guarantee — use the quote/mock-open
flow for that.

`askEvidence` is present only for Polymarket books: it records
whether the supplied ask snapshot parsed as a valid non-empty book
(`validated`) and when this server fetched it (`receivedAt`, its own
acquisition time, not an upstream trade time). Kalshi books omit it.
Both venues' books carry `receivedAt` and `sideEvidence`.

`outcomeExternalMarketId` selects a different outcome of the event
instead (a Kalshi `No` side is complemented). That book must have been
received less than 10 seconds earlier, otherwise `orderBook` is null;
an outcome that is not on the event returns 404.

## Path parameters

- `source` 'polymarket' | 'kalshi' | 'rothera' | 'limitless' | 'smarkets' | 'manifold' | 'metaculus' | 'predictit' | 'futuur' | 'myriad' | 'forecastex' | 'gemini', required
- `slug` string, required

## Query parameters

- `outcomeExternalMarketId` string

## Response `200`

Order book for one outcome (null when unsupported or empty)

- PublicPmOrderBookResponse
  - `source` 'polymarket' | 'kalshi' | 'rothera' | 'limitless' | 'smarkets' | 'manifold' | 'metaculus' | 'predictit' | 'futuur' | 'myriad' | 'forecastex' | 'gemini', required
  - `slug` string, required
  - `outcome` PublicPmMicrostructureOutcome, nullable, required: Which outcome this microstructure read describes; null when the event has neither an outcome name nor id.
    - `name` string, nullable
    - `externalMarketId` string, nullable
  - `orderBook` PublicPmOrderBook, nullable, required: Null when the source has no book endpoint or none is currently resting — a valid empty shape, not an error.
    - `bid` number, nullable, required
    - `ask` number, nullable, required
    - `spread` number, nullable, required
    - `midpoint` number, nullable, required
    - `bids` PublicPmOrderBookLevel[], required: Bid levels, best (highest price) first.
      - `price` number, required: Probability 0-1, a fraction.
      - `size` number, required: Resting size in shares (Polymarket) or contracts (Kalshi).
    - `asks` PublicPmOrderBookLevel[], required: Ask levels, best (lowest price) first.
      - `price` number, required: Probability 0-1, a fraction.
      - `size` number, required: Resting size in shares (Polymarket) or contracts (Kalshi).
    - `askEvidence` PublicPmOrderBookAskEvidence: Present only for Polymarket books; Kalshi books omit it.
      - `validated` boolean, required: Whether the supplied ask snapshot parsed as a valid non-empty book.
      - `receivedAt` string, date-time, required: This server's acquisition time, not an upstream trade time.
    - `receivedAt` string, date-time, nullable: When this server acquired the book (its own time, not a venue trade time).
    - `sideEvidence` PublicPmOrderBookSideEvidence: True when that side's supplied levels validated completely and the book is not crossed (an explicit empty side is valid). A dated observation, not a fill or liquidity guarantee.
      - `bid` boolean
      - `ask` boolean

## Other responses

- `400`: Invalid or missing parameters. On a route with a query allowlist, an undocumented query parameter returns `{"error": "unsupported_query_parameter", "message": "Unsupported query parameter: <key>. Supported: <keys>."}`.
- `404`: Resource not found. A path the API does not serve at all returns `{"error": "not_found", "message": "not_found"}` with `Cache-Control: no-store`.
- `500`: Server error
- `503`: The route already has its cap of venue requests in flight and refused this one at once (`error: "temporarily_busy"`), without queueing it. Sent with `Retry-After: 5` and `Cache-Control: no-store`; retry after `retryAfterSeconds`. Cached responses are never refused this way.

---

[API](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api.md) · [All operations](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/revisions/28fb59f285fe?raw)
