Endpoints
Complete reference for all PolyTest API endpoints.
List Markets
GET /v1/markets — Returns all available prediction markets. Supports filtering by coin, status, and timeframe.
curl -H "Authorization: Bearer $KEY" \
"https://api.polytest.io/v1/markets?coin=BTC&status=active"Get Snapshots
GET /v1/markets/:id/snapshots — Returns historical price snapshots for a market. Use limit and offset for pagination.
curl -H "Authorization: Bearer $KEY" \
"https://api.polytest.io/v1/markets/mkt_01/snapshots?limit=20&offset=0"Snapshot at Timestamp
GET /v1/snapshots/at-timestamp — Returns the nearest snapshot to a given millisecond epoch timestamp.
curl -H "Authorization: Bearer $KEY" \
"https://api.polytest.io/v1/snapshots/at-timestamp?market=mkt_01&ts=1740800000000"