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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | ✓ | Platform-native market ID (Polymarket condition ID or Kalshi ticker) |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | string | ✓ | polymarket kalshi |
limit | integer | Max results. Default 100, max 1000 | |
cursor | string | Pagination cursor (Kalshi) | |
offset | integer | Pagination 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
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | platform missing or unknown |
| 405 | UNSUPPORTED_OPERATION | Platform does not expose trades |