Prediction Router
API Reference

Market Trades

Public executed-trade history for a market

Fetch the public executed-trade history for a market, normalized to a single schema across platforms.

All endpoints require Authorization: Bearer <key>.

Base URL: https://prediction-router-api.kalashshah47.workers.dev

Platform support: polymarket kalshi.


GET /v1/markets/:id/trades

Path parameters

ParameterTypeRequiredDescription
idstring✓Platform-native market ID (Polymarket condition ID or Kalshi ticker)

Query parameters

ParameterTypeRequiredDescription
platformstring✓polymarket kalshi
limitintegerMax results. Default 100, max 1000
cursorstringPagination cursor (Kalshi)
offsetintegerPagination offset (Polymarket). Default 0

Example

curl "https://prediction-router-api.kalashshah47.workers.dev/v1/markets/0xcondition/trades?platform=polymarket&limit=2" \
  -H "Authorization: Bearer pr_..."

Response

{
  "trades": [
    {
      "id": "0xhash",
      "platform": "polymarket",
      "marketId": "0xcondition",
      "outcome": "Yes",
      "side": "buy",
      "price": 0.52,
      "size": 100,
      "timestamp": "2024-11-14T22:13:20.000Z",
      "taker": "0xabc..."
    }
  ]
}

The side field is buy/sell for Polymarket and yes/no for Kalshi (taker side).

Errors

StatusCodeMeaning
400VALIDATION_ERRORplatform missing or unknown
405UNSUPPORTED_OPERATIONPlatform does not expose trades