5 min setup
Quickstart
Get up and running with the PolyTest API in under 5 minutes. Authenticate, fetch markets, and retrieve snapshots — with live examples you can try right here.
1Authenticate
2Fetch Markets
3Get Snapshots
Step 1
Authenticate
Create a free account and generate an API key from your dashboard. All requests are authenticated via the X-API-Key header.
Your API Key
Get a keyYour key is only used for live requests from this browser and is never stored or sent to our servers.
Key rotation: We recommend rotating your API keys every 90 days.
# Copy your key from the dashboard
export POLYTEST_KEY="pt_live_your_key_here"
# Test it with a simple request
curl -H "X-API-Key: $POLYTEST_KEY" \
"https://api.polytest.io/api/health"Step 2
Fetch Markets
Query all available prediction markets. Filter by coin (BTC, ETH, SOL — with XRP, DOGE & BNB coming soon) and market timeframe. Returns paginated results sorted newest first.
curl -H "X-API-Key: $POLYTEST_KEY" \
"https://api.polytest.io/api/v1/markets?coin=btc&market_type=5m&limit=3"Step 3
Get Snapshots
Fetch historical price snapshots for any market. Each snapshot includes the asset price, up/down outcome probabilities, and optional orderbook depth. Snapshots are captured 8 times per second.
curl -H "X-API-Key: $POLYTEST_KEY" \
"https://api.polytest.io/api/v1/markets/1496946/snapshots?limit=5"