v1

latestOpenAPI 3.1.02026-07-243035381.4 MB
Prediction API

Get recent market trades

/v4/data/prediction/markets/{id}/trades

100 credits per API call

Recent trades feed for a single market. Each row is one fill — outcome side, buy/sell direction, price, size and notional value — with the taker wallet attribution when the upstream exposes it.

Filtering and pagination

  • after and before are ISO-8601 timestamps that define an inclusive time window. They are honoured by Kalshi natively. On Polymarket the upstream /trades feed has no time-window filter, so passing after or before against a Polymarket market returns 400 — set the platform via the path id rather than attempting cross-platform time queries.
  • Pagination is cursor-based. The first call returns a pagination.cursor; pass it back verbatim as ?cursor=… on the next call. Cursors are fingerprint-bound to the time-window filter set.

Other notes

  • taker is the wallet that crossed the spread on this fill. Populated on Polymarket; null on Kalshi (the public trades feed does not expose per-trade wallet attribution there).
  • txHash is the on-chain settlement transaction hash where one exists. Populated on Polymarket and null on Kalshi.
  • side is the outcome side (yes / no); direction is the order side (buy / sell) — both are surfaced because they answer different questions.
get/v4/data/prediction/markets/{id}/trades

Path parameters

idstring required
Example:KXELONMARS-99

Platform-native market identifier.

Query parameters

afterstring date-time
Example:2026-05-01T00:00:00Z

Inclusive lower bound on the trade timestamp (ISO-8601). Kalshi-only — passing this against a Polymarket market returns 400.

beforestring date-time
Example:2026-05-15T00:00:00Z

Inclusive upper bound on the trade timestamp (ISO-8601). Kalshi-only — passing this against a Polymarket market returns 400. Must be later than after when both are provided.

cursorstring

Opaque base64-encoded pagination token. Returned in pagination.cursor on responses that have more pages. Pass back verbatim as ?cursor=… to fetch the next page. Cursors are fingerprint-bound to the filter set — modifying any filter between calls invalidates the cursor and returns 400. The field is omitted from pagination on the last page.

Example:eyJwbUV2dEN1cnNvciI6IjIwMjUtMTEtMDFUMTI6MzQ6NTZaIn0=

Opaque cursor returned by the previous response's pagination.cursor. Omit on the first call.

limitinteger
Example:50

Page size. Defaults to 50 when omitted.

Response

OK

Example response

{
  "data": [
    {
      "tradeId": "0x9c1f3a7b…",
      "marketId": "KXELONMARS-99",
      "platform": "polymarket",
      "side": "yes",
      "direction": "buy",
      "price": 0.42,
      "size": 250,
      "notionalValue": 105,
      "taker": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
      "txHash": "0xabc123…",
      "timestamp": "2026-05-18T12:34:00Z"
    }
  ],
  "pagination": {
    "cursor": "eyJwbUV2dEN1cnNvciI6IjIwMjUtMTEtMDFUMTI6MzQ6NTZaIn0=",
    "pageSize": 20
  }
}