Polyrankdocs

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, smart-money tags, per-market positioning, and the 24-hour smart-money flow.

Endpoints & prices

Base URL: https://api.polyrank.app (also served at https://api-agent.polyrank.app).

EndpointPriceReturns
GET /v1/agent/compare$0.052–4 traders head-to-head: all metrics + percentiles + per-metric winner + live marks
GET /v1/agent/credits/balance$0.001Prepaid credit balance for the caller wallet (micro-USDC)
POST /v1/agent/credits/deposit$0.01Prepay USDC credits (authorize the deposit amount; settles in full + volume bonus). Price is a floor
GET /v1/agent/identity/{proxy}$0.03Multi-wallet identity: the person’s full wallet set + combined per-user metrics
GET /v1/agent/leaderboard$0.03Default/preset top-N board, per-metric sort + window, unmasked
GET /v1/agent/market/{conditionId}$0.01Market summary (consensus + settlement-corrected mid + shallow book)
GET /v1/agent/market/{conditionId}/concentration$0.05Holder concentration: top-N share + HHI per side + smart-money share of open interest
GET /v1/agent/market/{conditionId}/fills$0.01Recent fills (the tape) for a market
GET /v1/agent/market/{conditionId}/flow$0.015-min flow buckets for the trailing window (max 168h)
GET /v1/agent/market/{conditionId}/flow/cohort$0.10Skill-attributed net YES-equivalent flow by smart-money vs crowd cohort. No competitor sells this
GET /v1/agent/market/{conditionId}/holders$0.05Top current holders with live value + P&L (canonical avg-cost lineage)
GET /v1/agent/market/{conditionId}/liquidity-history$0.02Liquidity depth over time: daily rollup or 15-min intraday YES-token depth buckets (copyability substrate)
GET /v1/agent/market/{conditionId}/positioning$0.05Top-200 positioned wallets + smart-money tags + unrealized P&L
GET /v1/agent/market/{conditionId}/recap$0.15Resolution recap: outcome/provenance, who-called-early, winners/losers, smart-money hit-rate
GET /v1/agent/market/{conditionId}/resolution-risk$0.05Dispute-risk score (Low/Elevated/High + reasons) + live UMA settlement state
GET /v1/agent/market/{conditionId}/stats$0.02All-time market aggregate stats (volume, traders, lifespan, top traders)
POST /v1/agent/markets/batch$0.15Bulk market summaries for up to 100 condition_ids in one call (consensus + settlement-corrected mid + resolution). $0.0015/market, capped
GET /v1/agent/metrics/distribution/{metric}$0.01Cohort distribution of one metric (precomputed snapshot)
GET /v1/agent/movers$0.02Daily skill-rank climbers/fallers (unmasked). Supports ?since= incremental cursor
GET /v1/agent/pulse$0.02Discover feed: consensus divergence + sharp moves + trending markets. Supports ?since=
POST /v1/agent/rankings/custom$0.20Custom composite ranking over the full wallet cohort (weights + filters) — the flagship
GET /v1/agent/rankings/preset/{slug}$0.04Top-N for a named Polyrank preset (same full-cohort scan as custom; fixed weights)
GET /v1/agent/rankings/presets$0.001List of Polyrank preset ranking slugs + labels
GET /v1/agent/rankings/published/{slug}$0.02A user-published custom ranking by its public slug
GET /v1/agent/reports/smart-money$0.05Curated weekly smart-money report (movers, big wins, divergence, calibration leader)
GET /v1/agent/reports/smart-money/{week}$0.05Curated smart-money report for a specific ISO week
GET /v1/agent/search$0.001Universal resolver: username / market text / 0x / condition_id → traders + markets
GET /v1/agent/signals/smart-money$0.05Recent smart-money signal events. Supports ?since= cursor (incremental → $0.02 effective)
GET /v1/agent/trader/{proxy}$0.02Trader profile + lifetime metrics + percentiles (richer than a generic address summary)
GET /v1/agent/trader/{proxy}/calibration$0.15Calibration: Brier + 10-bin reliability diagram (the skilled-vs-lucky verdict). No competitor equivalent
GET /v1/agent/trader/{proxy}/copy-fitness$0.10Curated copy-decision bundle: hold-time, entry price, taker share, clip distribution, traded-market liquidity, verdict + budget-fit at ?budget=
GET /v1/agent/trader/{proxy}/playbook$0.05Trader Playbook: best categories, stake buckets, entry timing, sizing, co-traders
GET /v1/agent/trader/{proxy}/pnl-curve$0.03Equity / realized-P&L curve over time (avg-cost-faithful, validated to the cent)
GET /v1/agent/trader/{proxy}/position-changes$0.02Per-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.03Open/closed positions + live unrealized mark (the "am I in sync?" reconciliation call)
GET /v1/agent/trader/{proxy}/tags$0.03Smart-money skill tags for one wallet (prediction-market-scoped)
GET /v1/agent/trader/{proxy}/trades$0.02Paginated 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.15Bulk score up to 100 wallets in one call (metrics + percentiles + tags). $0.0015/wallet, capped
GET /v1/agent/traders/recently-active$0.02Most 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.02Highest-ROI resolved trades, UNMASKED real wallets + exact ROI
GET /v1/agent/webhooks$0.001List the caller wallet’s webhook subscriptions (management; payer wallet = identity)
POST /v1/agent/webhooks$0.005Register an agent-owned webhook subscription (trader.fill / market.resolved / signal.smart_money)
DELETE /v1/agent/webhooks/{id}$0.001Deactivate one of the caller wallet’s webhook subscriptions
POST /v1/agent/ws-token$0.005Mint a short-TTL WebSocket token (x402-authorized) to open the live trade/market firehose
GET /v1/agent/metrics/catalogfreeManifest of buyable metrics — the free catalog an agent reads to know what to buy
GET /x402/infofreeMachine-readable endpoint + payment discovery

POST /v1/agent/rankings/custom takes the Ranking Builder's config shape (see Ranking Builder): a weights map of metric id → {weight, window} plus optional cohort filters — activity floors (min_trades, min_resolved, min_volume_usdc, min_active_days), value gates (min_realized_pnl, min_profit_factor, min_win_rate_pct, max_roi_pct, since_date), recency (active_within_days, first_trade_within_days, max_volume_usdc, best_category), relative percentile gates (skill_gates: top-X% on any metric, max 8), and absolute raw-value ranges (metric_filters: {metric, min?, max?} on any displayable metric's lifetime value, max 12 — unmeasured wallets are excluded by definition). Three web-only filters are NOT applied on the agent tier (exclude_bonders, smart_money_tags_any_of, follower_count_max) — they need auxiliary tables the lean executor skips; configs carrying them are accepted with those keys ignored. The top-level na_policy field ("exclude" default, or "neutral_50") controls wallets missing a weighted metric — exclude them (only fully-measured wallets qualify) or score the gap as a neutral 50th percentile — and is honored identically to the web Builder, including on /v1/agent/rankings/published/{slug}. Invalid configs are rejected with 400 before settlement — you are never charged for a rejected request.

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 smart-money signal events. 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 smart-money signal events. 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:

Cost math

BudgetBuys you
$0.105 trader profiles
$120 signal pulls, or 50 trader profiles
$5A day of aggressive polling for a small strategy bot

Always assert maxAmountRequired against your budget before signing — see the guardrails section of each quickstart.

On this page