x402 Agent API
Pay-per-request Polymarket skill data for AI agents — USDC on Base, no subscription, no API key.
The Agent API sells Polyrank's deep data per request, priced in USDC on
Base, using the open x402 protocol. There
is no signup, no API key, and no subscription: your agent calls an endpoint,
receives an HTTP 402 with payment requirements, signs a USDC authorization,
and retries. Total integration is a few lines with the official SDKs.
The free /v1/public/* API (see Quickstart) covers
leaderboards and commodity stats. The paid agent tier adds the deep grid:
full lifetime metrics, trader tags, per-market positioning, and the
24-hour flow of tagged traders.
Endpoints & prices
Base URL: https://api.polyrank.app (also served at
https://api-agent.polyrank.app).
| Endpoint | Price | Returns |
|---|---|---|
GET /v1/agent/compare | $0.05 | 2–4 traders head-to-head: all metrics + percentiles + per-metric winner + live marks |
GET /v1/agent/copy-engine/board | $0.05 | Copy Engine board: the forward-tested copyable wallets with their gates, copyability, depth-capped clip sizes and reasons, for any published day (unmasked, uncapped) |
GET /v1/agent/copy-engine/funnel | $0.01 | Copy Engine per-gate funnel: wallets remaining after each hard gate for a published day |
GET /v1/agent/copy-engine/methodology | $0.01 | Copy Engine parameters actually in force for a published day (from the run journal), plus gate and metric definitions |
GET /v1/agent/credits/balance | $0.001 | Prepaid credit balance for the caller wallet (micro-USDC) |
POST /v1/agent/credits/deposit | $0.01 | Prepay USDC credits (authorize the deposit amount; settles in full + volume bonus). Price is a floor |
GET /v1/agent/event/{slug} | $0.02 | Event (fixture) profile: its questions with mids, fee and resolver facts, neg-risk overround |
GET /v1/agent/event/{slug}/traders | $0.05 | Who is in an event: top holders, skill-ranked active wallets and tagged-trader vs crowd flow (unmasked) |
GET /v1/agent/events/top | $0.02 | Open events ranked by 24h volume, one row per fixture |
GET /v1/agent/identity/{proxy} | $0.03 | Multi-wallet identity: the person’s full wallet set + combined per-user metrics |
GET /v1/agent/leaderboard | $0.03 | Default/preset top-N board, unmasked; ?sort= orders it by any metric (metric:ID, pctile:ID, engine:ID or timing:ID) |
GET /v1/agent/market/{conditionId} | $0.01 | Market summary (holder average entry + settlement-corrected mid + shallow book) |
GET /v1/agent/market/{conditionId}/active-traders | $0.05 | Wallets active in one market ranked by price-adjusted category edge, plus the pre-registered lean (unmasked) |
GET /v1/agent/market/{conditionId}/concentration | $0.05 | Holder concentration: top-N share + HHI per side + tagged traders' share of open interest |
GET /v1/agent/market/{conditionId}/fills | $0.01 | Recent fills (the tape) for a market |
GET /v1/agent/market/{conditionId}/flow | $0.01 | 5-min flow buckets for the trailing window (max 168h) |
GET /v1/agent/market/{conditionId}/flow/cohort | $0.10 | Net YES-equivalent flow split by Polyrank track-record tag (whale/sharp/early_bird/contrarian) vs untagged wallets. No competitor sells this |
GET /v1/agent/market/{conditionId}/holders | $0.05 | Top current holders with live value + P&L (canonical avg-cost lineage) |
GET /v1/agent/market/{conditionId}/liquidity-history | $0.02 | Liquidity depth over time: daily rollup or 15-min intraday YES-token depth buckets (copyability substrate) |
GET /v1/agent/market/{conditionId}/positioning | $0.05 | Top-200 positioned wallets + Polyrank track-record tags + unrealized P&L |
GET /v1/agent/market/{conditionId}/prices | $0.01 | YES price history for one market (1d / 1w / 1m / all) |
GET /v1/agent/market/{conditionId}/recap | $0.15 | Resolution recap: outcome/provenance, who-called-early, winners/losers, tagged traders' hit rate |
GET /v1/agent/market/{conditionId}/resolution-risk | $0.05 | Dispute-risk score (Low/Elevated/High + reasons) + live UMA settlement state |
GET /v1/agent/market/{conditionId}/stats | $0.02 | All-time market aggregate stats (volume, traders, lifespan, top traders) |
POST /v1/agent/markets/batch | $0.15 | Bulk market summaries for up to 100 condition_ids in one call (holder average entry + settlement-corrected mid + resolution). $0.0015/market, capped |
GET /v1/agent/metrics/coverage | $0.02 | Per-metric ranked coverage (how many wallets have a percentile) at every window |
GET /v1/agent/metrics/distribution/{metric} | $0.01 | Cohort distribution of one metric (precomputed snapshot) |
GET /v1/agent/movers | $0.02 | Daily skill-rank climbers/fallers (unmasked). Supports ?since= incremental cursor |
GET /v1/agent/pulse | $0.02 | Discover feed: holder-entry vs mid + sharp moves + trending markets. Supports ?since= |
POST /v1/agent/rankings/custom | $0.20 | Custom composite ranking over the full wallet cohort (weights + filters) — the flagship |
GET /v1/agent/rankings/preset/{slug} | $0.04 | Top-N for a named Polyrank preset (same full-cohort scan as custom; fixed weights) |
GET /v1/agent/rankings/presets | $0.001 | List of Polyrank preset ranking slugs + labels |
GET /v1/agent/rankings/published/{slug} | $0.02 | A user-published custom ranking by its public slug |
GET /v1/agent/reports/smart-money | $0.05 | Curated weekly Skill Report (movers, big wins, holder entry vs mid, calibration leader) |
GET /v1/agent/reports/smart-money/{week} | $0.05 | Curated weekly Skill Report for a specific ISO week |
GET /v1/agent/resolutions | $0.01 | Since-cursor feed of on-chain market resolutions, for mechanical settlement |
GET /v1/agent/search | $0.001 | Universal resolver: username / market text / 0x / condition_id → traders + markets |
GET /v1/agent/signals/smart-money | $0.05 | Recent tagged-trader signal events (large trades by tagged wallets). Supports ?since= cursor (incremental → $0.02 effective) |
GET /v1/agent/stats | $0.001 | Platform totals: wallets, trades, markets, live metric count, since year |
GET /v1/agent/trader/{proxy} | $0.02 | Trader profile + lifetime metrics + percentiles (richer than a generic address summary) |
GET /v1/agent/trader/{proxy}/activity | $0.02 | Unified activity feed: BUY/SELL fills, REDEEM settlements, Split/Merge/Convert — paged |
GET /v1/agent/trader/{proxy}/calibration | $0.15 | Calibration: Brier + 10-bin reliability diagram (the skilled-vs-lucky verdict). No competitor equivalent |
GET /v1/agent/trader/{proxy}/copy-fitness | $0.10 | Curated copy-decision bundle: hold-time, entry price, taker share, clip distribution, traded-market liquidity, verdict + budget-fit at ?budget= |
GET /v1/agent/trader/{proxy}/metrics | $0.02 | Every metric displayable at ?window= (lifetime/90d/30d/7d/24h) for one trader: raw value + percentile in that window's cohort — the cells a windowed board ranks on |
GET /v1/agent/trader/{proxy}/playbook | $0.05 | Trader Playbook: best categories, stake buckets, entry timing, sizing, co-traders |
GET /v1/agent/trader/{proxy}/pnl-curve | $0.03 | Equity / realized-P&L curve over time (avg-cost-faithful, validated to the cent) |
GET /v1/agent/trader/{proxy}/position-changes | $0.02 | Per-token entry/increase/decrease/exit CHANGE events since a cursor (copy-trade poll). Supports ?wallets=a,b,c (max 10) at the same flat price; each change carries proxy_wallet |
GET /v1/agent/trader/{proxy}/positions | $0.03 | Open/closed positions + live unrealized mark (the "am I in sync?" reconciliation call) |
GET /v1/agent/trader/{proxy}/predictor | $0.03 | Predictor card: prediction accuracy, closed win rate, held-to-resolution share, luck-adjusted edge z, biggest win/loss, worst day |
GET /v1/agent/trader/{proxy}/return-distribution | $0.02 | Histogram of returns over EVERY resolved position, with the bucketed and the unscorable count |
GET /v1/agent/trader/{proxy}/tags | $0.03 | Trader skill tags for one wallet (prediction-market-scoped) |
GET /v1/agent/trader/{proxy}/timing-skill | $0.05 | Category × entry-timing skill grid (shrunken skill, n, rankable flag, best cell, timing profile) — the pre-game / in-play specialist signal |
GET /v1/agent/trader/{proxy}/trades | $0.02 | Paginated fill history (cursor) with skill context — core copy-trade data. Supports ?since= (unix s/ms or ISO-8601) and ?side=maker|taker|both |
POST /v1/agent/traders/batch | $0.15 | Bulk score up to 100 wallets in one call (metrics + percentiles + tags). $0.0015/wallet, capped |
GET /v1/agent/traders/recently-active | $0.02 | Most profitable traders (by our metrics) who just traded: 5m–24h windows, unmasked, sortable by any metric (lifetime|30d). Activity is minutes-grain live; metric values are grid cadence. Supports ?since= incremental cursor |
GET /v1/agent/trades/top-roi | $0.02 | Highest-ROI resolved trades, UNMASKED real wallets + exact ROI |
GET /v1/agent/webhooks | $0.001 | List the caller wallet’s webhook subscriptions (management; payer wallet = identity) |
POST /v1/agent/webhooks | $0.005 | Register an agent-owned webhook subscription (trader.fill / market.resolved / signal.smart_money) |
DELETE /v1/agent/webhooks/{id} | $0.001 | Deactivate one of the caller wallet’s webhook subscriptions |
POST /v1/agent/ws-token | $0.005 | Mint a short-TTL WebSocket token (x402-authorized) to open the live trade/market firehose |
GET /v1/agent/metrics/catalog | free | Manifest of buyable metrics — the free catalog an agent reads to know what to buy |
GET /v1/agent/metrics/windows | free | Which metric exists at which window, how it can be used (weight / gate / sort) and whether the as_of snapshot answers it |
GET /v1/agent/rankings/goals | free | The Ranking Builder's goals as ready-to-POST /v1/agent/rankings/custom bodies (reproduce the Builder's boards) |
GET /v1/agent/catalog | free | Every endpoint with its price, input JSON Schema (path, query, body) and an example — read off the route validators |
GET /x402/info | free | Machine-readable endpoint + payment discovery |
The smart-money in /v1/agent/reports/smart-money and /v1/agent/signals/smart-money is a historical id, kept so
existing integrations and paid agents keep working: the first two serve the weekly Skill Report, the third the
tagged-trader signal feed (large trades by wallets carrying a behaviour tag — tags describe size and style, not a
proven record).
POST /v1/agent/rankings/custom takes exactly the request the main API's
POST /v1/rankings/custom takes — the same schema object, strict at every level
(see Ranking Builder): a weights map of metric id →
{weight, window} over the 84 catalog metrics at any window they exist at, plus the
copy-engine score sk_score_14d and the entry-timing ids at lifetime; and the full
filters set — activity floors, value gates, recency (active_within_days,
active_within_hours), categories / best_category, exclude_bonders,
skill_gates and metric_filters (each with a window), copy_engine, timing,
cluster_policy, copy_placeable, smart_money_tags_any_of and
follower_count_max — all applied as the web Builder applies them. Two filters are
refused on every rail, here and on the main API: market_kinds and
exchange_versions (no per-wallet data exists for them). The options explain,
extra_metrics, extra_engine_metrics, include_raw, include_verdict,
include_cluster / dedupe_clusters, sort_by / sort_dir and na_policy behave
as on the main API.
as_of (YYYY-MM-DD) is honoured or refused, never ignored. The board is
ranked from that day's metric snapshot (lifetime window, wallet grain, the
snapshotted metrics and the filters the snapshot can answer), and the response
echoes as_of. Any input the snapshot cannot answer — a windowed weight, a
copy_engine gate, explain, a non-composite sort, a day with no snapshot — is a
400 with the reason. GET /v1/agent/metrics/windows (free) lists which metric
exists at which window and exactly what as_of honours.
An unknown field anywhere in the body is a 400 (until 2026-10-17 an unknown
top-level field — including as_of — was silently dropped and the live board
billed). Every invalid config is rejected with 400 before settlement — you are
never charged for a rejected request. To reproduce one of the Builder's goals, POST
its request from GET /v1/agent/rankings/goals (free).
The flow in one diagram
Agent Polyrank Facilitator
│ GET /v1/agent/… │ │
│────────────────────────────▶│ │
│ 402 {x402Version, accepts}│ │
│◀────────────────────────────│ │
│ sign EIP-3009 (USDC) │ │
│ GET … + X-PAYMENT │ │
│────────────────────────────▶│ verify │
│ │──────────────────────────────▶│
│ │◀──── isValid ─────────────────│
│ │ run handler, then settle │
│ │──────────────────────────────▶│
│ 200 + data │◀──── tx hash ─────────────────│
│ + X-PAYMENT-RESPONSE │ │
│◀────────────────────────────│ │You are charged only when the request succeeds — failed handlers never
settle, and a failed settlement returns 402 without moving your USDC.
The settlement receipt (with the on-chain transaction hash) comes back in
the X-PAYMENT-RESPONSE header. Full wire detail: Protocol.
Try the 402 right now
curl -s https://api.polyrank.app/v1/agent/signals/smart-money | jq{
"x402Version": 1,
"error": "payment required: Recent tagged-trader signal events (large trades by tagged wallets). Supports ?since= cursor (incremental → $0.02 effective)",
"accepts": [
{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "50000",
"resource": "https://api.polyrank.app/v1/agent/signals/smart-money",
"description": "Recent tagged-trader signal events (large trades by tagged wallets). Supports ?since= cursor (incremental → $0.02 effective)",
"mimeType": "application/json",
"payTo": "0xEC89C6e7028b0e30E22eB3409d2F7c273EB20164",
"maxTimeoutSeconds": 60,
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": { "name": "USD Coin", "version": "2" }
}
]
}maxAmountRequired is in atomic USDC units (6 decimals) — 50000 = $0.05.
asset is the canonical USDC contract on Base; extra is the EIP-712
domain your signer needs.
Pay it
You need a funded wallet with USDC on Base — see the cost math below for what a given budget buys. The official x402 SDKs handle the whole handshake:
TypeScript quickstart
@x402/fetch + viem — a paid call in ~10 lines.
Python quickstart
x402[httpx] + eth-account — for quants and bot builders.
Cost math
| Budget | Buys you |
|---|---|
| $0.10 | 5 trader profiles |
| $1 | 20 signal pulls, or 50 trader profiles |
| $5 | A day of aggressive polling for a small strategy bot |
Always assert maxAmountRequired against your budget before signing —
see the guardrails section of each quickstart.