{"openapi":"3.0.3","info":{"title":"Prediction Market Data API","description":"Prediction market prices, implied probabilities, volumes, movers, resolutions and history for AI agents, derived from public Polygon chain data (Polymarket exchange contracts). Pay per request in USDC over x402, or use an API key.","version":"2026.11.04"},"paths":{"/api/v1/health":{"get":{"tags":["Meta"],"summary":"Health (no key)","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"tags":["Meta"],"summary":"Health (no key)","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/data":{"get":{"tags":["Meta"],"summary":"Indexer health (no key)","operationId":"health_data_api_v1_health_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/pricing":{"get":{"tags":["Meta"],"summary":"Agent pricing (no key)","description":"Every way to pay over x402 with exact USDC prices. This is also the pricing document RealtimeAPI imports.","operationId":"pricing_api_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/keys":{"post":{"tags":["Authentication"],"summary":"Create a free API key (no signup)","description":"Returns an `pmd_live_` key once. Free tier: 5 requests a day, a taster. For steady use take a free\nRealtimeAPI.ai key (1,000 calls a month across every feed) or buy a time pass.","operationId":"create_key_api_v1_auth_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Authentication"],"summary":"Revoke your key","operationId":"revoke_api_v1_auth_keys_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/auth/keys/me":{"get":{"tags":["Authentication"],"summary":"Your key's tier and usage","operationId":"key_me_api_v1_auth_keys_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/auth/keys/rotate":{"post":{"tags":["Authentication"],"summary":"Rotate your key","operationId":"rotate_api_v1_auth_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/markets":{"get":{"tags":["Markets"],"summary":"Search and list markets","description":"Markets with their latest implied probability, 24 hour volume and status, busiest first. Filter by text, category or status; sort by volume, new or recent. By default only markets with at least $1,000 of volume in 24 hours are listed; set min_volume_usd=0 to see everything. Refreshes every 5 minutes.","operationId":"list_markets_api_v1_markets_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Q","description":"Text in the question title","examples":["fed"]},"description":"Text in the question title"},{"name":"category","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Category","description":"crypto, economy, politics, sports, weather, tech, culture, other","examples":["politics"]},"description":"crypto, economy, politics, sports, weather, tech, culture, other"},{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(open|resolved|all)$","default":"open","title":"Status"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(volume|new|recent)$","default":"volume","title":"Sort"}},{"name":"min_volume_usd","in":"query","required":false,"schema":{"type":"integer","maximum":10000000,"minimum":0,"default":1000,"title":"Min Volume Usd"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"include_untitled","in":"query","required":false,"schema":{"type":"boolean","description":"Include markets whose question text is not on-chain","default":false,"title":"Include Untitled"},"description":"Include markets whose question text is not on-chain"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.005","x-price":{"price_micro":5000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"markets_list","x-cadence":"Refreshes every 5 minutes."}},"/api/v1/markets/{market_id}":{"get":{"tags":["Markets"],"summary":"One market with every outcome","description":"Every outcome's last traded price (micro-USD) and implied probability (basis points), 24 hour volume and trades, status and resolution. market_id is a condition id, an outcome token id, or 'top' for the busiest live market. Refreshes every 15 seconds.","operationId":"get_market_api_v1_markets__market_id__get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"market_id","in":"path","required":true,"schema":{"type":"string","title":"Market Id"},"example":"top"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.01","x-price":{"price_micro":10000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"market_get","x-cadence":"Refreshes every 15 seconds."}},"/api/v1/markets/{market_id}/history":{"get":{"tags":["Markets"],"summary":"Price history as OHLC bars (Pro)","description":"OHLC bars per outcome in micro-USD with volume (taker side, micro-USD) and trade counts. interval 1m covers the last 90 days, 1h and 1d the full history. Bars are immutable once closed; the resolution is a separate field so a backtest cannot see the outcome early. Refreshes every 60 seconds.","operationId":"market_history_api_v1_markets__market_id__history_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"market_id","in":"path","required":true,"schema":{"type":"string","title":"Market Id"},"example":"top"},{"name":"interval","in":"query","required":false,"schema":{"type":"string","pattern":"^(1m|1h|1d)$","default":"1h","title":"Interval"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","nullable":true,"title":"From","examples":["2026-10-01T00:00:00Z"]}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","nullable":true,"title":"To","examples":["2026-11-01T00:00:00Z"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.02","x-price":{"price_micro":20000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"market_history","x-cadence":"Refreshes every 60 seconds."}},"/api/v1/movers":{"get":{"tags":["Markets"],"summary":"Biggest probability moves","description":"Open markets whose headline probability moved most over the window, among markets with at least $1,000 of volume in 24 hours. Refreshes every 5 minutes.","operationId":"get_movers_api_v1_movers_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(1h|24h|7d)$","default":"24h","title":"Window"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Category","examples":["crypto"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.01","x-price":{"price_micro":10000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"movers","x-cadence":"Refreshes every 5 minutes."}},"/api/v1/resolved":{"get":{"tags":["Markets"],"summary":"Recently resolved markets","description":"Resolved markets, newest first, with the winning outcome, resolution time and the winner's last traded price before resolution. Refreshes every 5 minutes.","operationId":"get_resolved_api_v1_resolved_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Category","examples":["sports"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.01","x-price":{"price_micro":10000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"resolved","x-cadence":"Refreshes every 5 minutes."}},"/api/v1/markets/{market_id}/consensus":{"get":{"tags":["Markets"],"summary":"Cross-venue consensus","description":"The real-money probability for one question (volume weighted across real-money venues) with any matched play-money venues shown beside it and not weighted in. Today the real-money side is the on-chain Polymarket price only; play-money matching arrives with the Manifold integration. Refreshes every 60 seconds.","operationId":"get_consensus_api_v1_markets__market_id__consensus_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"market_id","in":"path","required":true,"schema":{"type":"string","title":"Market Id"},"example":"top"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.015","x-price":{"price_micro":15000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"consensus","x-cadence":"Refreshes every 60 seconds."}},"/api/v1/calibration":{"get":{"tags":["Markets"],"summary":"Calibration of market prices (Pro)","description":"For resolved binary markets, how often the outcome priced at each probability bucket 24 hours before resolution actually won. Refreshes every 24 hours.","operationId":"get_calibration_api_v1_calibration_get","security":[{"ApiKeyAuth":[]},{}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","nullable":true,"title":"Category","examples":["politics"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402). Body lists accepts[] with USDC amount, network and payTo."}},"x-price-usdc":"0.015","x-price":{"price_micro":15000,"asset":"USDC","network":"eip155:8453"},"x-payment":"x402","x-payment-route-id":"calibration","x-cadence":"Refreshes every 24 hours."}},"/api/v1/payments/plans":{"get":{"tags":["Payments"],"summary":"Passes and accepted networks (no key)","operationId":"get_plans_api_v1_payments_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/agent-subscribe":{"post":{"tags":["Payments"],"summary":"Buy a pass (x402, gasless USDC)","description":"Two calls: first without a payment header returns 402 with the USDC amount and\nnetworks; the second with the signed `x-payment` header settles and returns an\n`pmd_live_` key (shown once) with a Pro pass. Passes stack: buying while one is active extends it.\n\nSend `X-API-Key` to extend an existing key instead of minting one.","operationId":"agent_subscribe_api_v1_payments_agent_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/invoices":{"get":{"tags":["Payments"],"summary":"Invoices for the calling key","operationId":"list_invoices_api_v1_payments_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"email":{"type":"string","title":"Email","description":"Where this key belongs. Agents: your human's real address, else your own mailbox.","example":"owner@yourcompany.com"}},"type":"object","required":["email"],"title":"APIKeyCreate"},"AgentSubscribeRequest":{"properties":{"plan":{"type":"string","title":"Plan","description":"pass_1h, pass_1d or pass_7d","example":"pass_1d"}},"type":"object","required":["plan"],"title":"AgentSubscribeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"servers":[{"url":"https://predictionmarketdataapi.com"}],"tags":[{"name":"Meta","description":"Health, index and pricing. No key."},{"name":"Authentication","description":"Free keys and key management."},{"name":"Markets","description":"Markets, prices, implied probabilities, history, movers and resolutions."},{"name":"Analytics","description":"Cross-venue consensus and calibration."},{"name":"Payments","description":"x402 timed passes and invoices. No subscriptions."}]}