API overview
Base URLs, auth, conventions, and how this reference is generated.
Base URL: https://api.polyrank.app. All routes are versioned under
/v1. Responses are JSON; errors use the
standard envelope; every response carries X-Trace-Id.
Auth at a glance
- Public (
/v1/public/*,/v1/stats/overview) — anonymous, cached, CORS*. - Everything else — session cookie or
Authorization: Bearer pk_live_…(API keys). Quotas per plan. /v1/agent/*— pay-per-request via x402; documented in its own section, not here.
Conventions
- Wallet addresses are
0x+ 40 hex; market ids (conditionId) are0x+ 64 hex. Public market routes also accept the Polymarket slug. - Money is USDC; prices are probabilities in
[0, 1]. - Cached endpoints expose
Cache-Controland a snapshot-age header — honor them instead of re-polling.
About this reference
The pages in this section are generated from the live API's request/ response schemas (every route is zod-validated; the spec is emitted straight from those schemas), grouped by tag. Each page documents parameters, response shapes, and example calls.
This OpenAPI document itself is downloadable — point codegen or a custom GPT at the spec used to build these pages.