Quickstart

Get up and running with the PolyTest API in under 5 minutes.

1. Get your API key

Sign up for a free account and create an API key from the dashboard. Your key will look like pt_live_xxxx.

# Copy your key from the dashboard
export POLYTEST_KEY="pt_live_your_key_here"

2. Fetch markets

List all available prediction markets with a single API call.

curl -H "Authorization: Bearer $POLYTEST_KEY" \
  https://api.polytest.io/v1/markets

3. Get snapshots

Fetch historical price snapshots for any market. Snapshots include bid, ask, mid price, spread, and volume.

curl -H "Authorization: Bearer $POLYTEST_KEY" \
  https://api.polytest.io/v1/markets/mkt_01/snapshots?limit=10