API Reference
Users
Public trade history for a user on a platform
Fetch a user's public trade history, scoped to one platform.
All endpoints require Authorization: Bearer <key>.
Base URL: https://prediction-router-api.kalashshah47.workers.dev
Platform support: polymarket. Other platforms return 405 UNSUPPORTED_OPERATION.
The :handle is the user's Polymarket wallet address.
GET /v1/users/:handle/trades
Fetch a user's public trade history.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | string | ✓ | polymarket |
limit | integer | Max results. Default 100, max 1000 | |
offset | integer | Pagination offset (Polymarket). Default 0 |
Response
{
"trades": [
{
"id": "0xhash",
"platform": "polymarket",
"marketId": "0xcondition",
"outcome": "Yes",
"side": "buy",
"price": 0.55,
"size": 12,
"timestamp": "2024-11-14T22:13:20.000Z"
}
]
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | platform missing or unknown |
| 405 | UNSUPPORTED_OPERATION | Platform does not expose this resource |