API reference
Market data (public)
Five read-only endpoints, no auth required, rate-limited by IP. Money fields are strings in payment-token base units (6 decimals in the examples); prices are integer cents; states are the one-word vocabulary, verbatim.
List & search markets
/trade-api/v1/marketsno authLists markets with status, prices, and volume. Supports search and cursor pagination.
| Query parameter | Type | Description | |
|---|---|---|---|
q | string | optional | Free-text search over market questions. |
status | string | optional | Filter by state: PENDING, OPEN, MATCHED, SETTLING, SETTLED, or VOID. |
cursor | string | optional | Opaque cursor from a previous page's next_cursor. |
limit | int | optional | Page size (server-capped). |
curl "http://localhost:8080/trade-api/v1/markets?status=OPEN&limit=2"{
"markets": [
{
"id": "42",
"question": "Will it rain in San Francisco on Saturday?",
"status": "OPEN",
"yes_price_cents": 12,
"no_price_cents": 88,
"volume": "2730000000",
"creator": "0x1b7e…c2d4",
"created_at": "2026-07-12T18:03:11Z"
},
{
"id": "41",
"question": "Will the Warriors win game 7 tonight?",
"status": "MATCHED",
"yes_price_cents": 44,
"no_price_cents": 56,
"volume": "18904000000",
"creator": "0x9f21…88aa",
"created_at": "2026-07-11T02:44:09Z"
}
],
"next_cursor": "eyJvZmZzZXQiOjJ9"
}Get a market
/trade-api/v1/markets/{id}no authFull detail for one market, including the public structured settlement query. direction is present once SETTLED (true = YES).
curl "http://localhost:8080/trade-api/v1/markets/42"{
"market": {
"id": "42",
"question": "Will it rain in San Francisco on Saturday?",
"status": "SETTLED",
"direction": false,
"yes_price_cents": 12,
"no_price_cents": 88,
"volume": "2730000000",
"creator": "0x1b7e…c2d4",
"settlement_query": {
"question": "Will it rain in San Francisco on 2026-07-18?",
"category": "weather",
"rule": "single",
"sources": [
{ "id": "nws", "name": "NWS/NOAA", "url": "https://api.weather.gov" }
]
},
"created_at": "2026-07-12T18:03:11Z"
}
}Get the order book
/trade-api/v1/markets/{id}/bookno authAggregated resting liquidity by price level, best-priced first, both sides. For live deltas, subscribe to book:{marketId} over the WebSocket.
curl "http://localhost:8080/trade-api/v1/markets/42/book"{
"book": {
"market_id": "42",
"yes": [
{ "price_cents": 62, "shares": "1250" },
{ "price_cents": 61, "shares": "780" },
{ "price_cents": 60, "shares": "320" }
],
"no": [
{ "price_cents": 37, "shares": "1100" },
{ "price_cents": 36, "shares": "640" }
]
}
}Note
p + q ≥ 100. The spread here is 62 + 37 = 99: one cent apart.Get trades
/trade-api/v1/markets/{id}/tradesno authFill history for a market, newest first, cursor-paginated. side is the taker’s side; fee is the taker fee in token base units.
| Query parameter | Type | Description | |
|---|---|---|---|
cursor | string | optional | Opaque pagination cursor. |
limit | int | optional | Page size (server-capped). |
curl "http://localhost:8080/trade-api/v1/markets/42/trades?limit=1"{
"trades": [
{
"id": "f7a2…",
"market_id": "42",
"price_cents": 62,
"shares": "300",
"side": "yes",
"fee": "1649200",
"tx_hash": "0x8c31…e9d0",
"created_at": "2026-07-15T21:09:44Z"
}
],
"next_cursor": null
}Get resolution sources
/trade-api/v1/markets/{id}/sourcesno authResolution transparency: the parsed authoritative sources bound to this market, with the category and rule that governs them — see Settlement & sources.
curl "http://localhost:8080/trade-api/v1/markets/42/sources"{
"sources": [
{ "id": "nws", "name": "NWS/NOAA", "url": "https://api.weather.gov" }
],
"category": "weather",
"rule": "single"
}