Thassa.

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

GET/trade-api/v1/marketsno auth

Lists markets with status, prices, and volume. Supports search and cursor pagination.

Query parameterTypeDescription
qstringoptionalFree-text search over market questions.
statusstringoptionalFilter by state: PENDING, OPEN, MATCHED, SETTLING, SETTLED, or VOID.
cursorstringoptionalOpaque cursor from a previous page's next_cursor.
limitintoptionalPage size (server-capped).
curl
curl "http://localhost:8080/trade-api/v1/markets?status=OPEN&limit=2"
200 response
{
  "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

GET/trade-api/v1/markets/{id}no auth

Full detail for one market, including the public structured settlement query. direction is present once SETTLED (true = YES).

curl
curl "http://localhost:8080/trade-api/v1/markets/42"
200 response
{
  "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

GET/trade-api/v1/markets/{id}/bookno auth

Aggregated resting liquidity by price level, best-priced first, both sides. For live deltas, subscribe to book:{marketId} over the WebSocket.

curl
curl "http://localhost:8080/trade-api/v1/markets/42/book"
200 response
{
  "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

A YES level at 62¢ crosses a NO level at 38¢ or better — p + q ≥ 100. The spread here is 62 + 37 = 99: one cent apart.

Get trades

GET/trade-api/v1/markets/{id}/tradesno auth

Fill history for a market, newest first, cursor-paginated. side is the taker’s side; fee is the taker fee in token base units.

Query parameterTypeDescription
cursorstringoptionalOpaque pagination cursor.
limitintoptionalPage size (server-capped).
curl
curl "http://localhost:8080/trade-api/v1/markets/42/trades?limit=1"
200 response
{
  "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

GET/trade-api/v1/markets/{id}/sourcesno auth

Resolution transparency: the parsed authoritative sources bound to this market, with the category and rule that governs them — see Settlement & sources.

curl
curl "http://localhost:8080/trade-api/v1/markets/42/sources"
200 response
{
  "sources": [
    { "id": "nws", "name": "NWS/NOAA", "url": "https://api.weather.gov" }
  ],
  "category": "weather",
  "rule": "single"
}