{"openapi":"3.1.0","info":{"title":"CopyGrade public API","version":"1.1.0","summary":"CopyGrade Scores, verdicts and farming flags for Polymarket wallets, over HTTPS.","description":"CopyGrade is the due-diligence layer for Polymarket copy-trading: every wallet gets a 0–100 CopyGrade Score, five sub-scores, a farming-risk level and post-fee edge figures. This API returns the same numbers the public verdict pages render — there is no API-only data tier, and nothing here executes trades or holds funds.\n\n**Two tiers, one header.** Send no `Authorization` header and a read answers from a per-IP budget (20 a minute and 200 a day per IP), shared-cacheable for 300 seconds. Send `Authorization: Bearer lv_sk_…` (a Pro key minted at Account → API access) and the same read moves onto the key's own quota (1,000 quota units per UTC day plus 60 requests a minute per key), `Cache-Control: no-store`. The keyed-only surfaces — batch scoring, watchlist sync and farming webhooks — have no keyless tier and answer 401 without a header.\n\n**Quota headers.** Every 200 carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`; the keyed tier adds `X-RateLimit-Reset` (epoch seconds of the next UTC midnight, when the quota rolls). A 429 carries `Retry-After` unless the wait rounds to zero. A batch or a watchlist write costs one unit per distinct address and is spent atomically before the read: it fits whole or is refused whole with the units still left in `X-RateLimit-Remaining`.\n\n**Scopes.** A key carries a closed set of scopes (`read`, `watchlist:write`, `webhooks:write`), fixed at mint and read-only by default. Each operation names the scope it asserts in `x-scopes`; a key without it answers 403 and nothing is debited. `webhooks:write` gates every method of the farming-webhook subscription endpoint; the deliveries themselves are described under the top-level `webhooks` object.\n\n**Honest misses.** A 404 (or a `found: false` row) means CopyGrade has not indexed the address — a real answer from a database that responded, never a failed lookup, which is a 503 with `Retry-After`. Every miss carries a `hint` URL to the free live grade, which also queues the wallet for the index.\n\nThe Model Context Protocol server at `/api/mcp` exposes the same reads to AI agents as tools; it is JSON-RPC, documented at `/mcp`, and not part of this document.","termsOfService":"https://copygrade.com/terms","contact":{"name":"CopyGrade","url":"https://copygrade.com/api-waitlist"}},"servers":[{"url":"https://copygrade.com","description":"This deployment — the origin the document was served from."}],"tags":[{"name":"wallets","description":"Scores and lists — public data, two tiers."},{"name":"watchlist","description":"The key owner's watchlist — account-private, keyed only."},{"name":"webhooks","description":"Farming-webhook subscriptions — signed deliveries on the in-app alert's own trigger, keyed only."},{"name":"meta","description":"This document."}],"paths":{"/api/v1/wallets/{address}":{"get":{"operationId":"getWallet","summary":"One wallet's CopyGrade Score and verdict","description":"The full score, verdict band and label, the five sub-scores, the farming level and signal count, and both 90-day edges for one Polymarket wallet — the same numbers its public verdict page renders. Order of checks: the caller is admitted first (tier, budget or quota), then the address shape, then the lookup — so a malformed address is a 400 that has already cost its slot or unit, unlike the list routes, which parse before admitting.","tags":["wallets"],"security":[{},{"apiKey":[]}],"x-scopes":["read"],"x-cost":"1 keyless slot, or 1 quota unit on a key","parameters":[{"$ref":"#/components/parameters/Address"}],"responses":{"200":{"description":"The wallet's public payload.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Wallet"}}}}}},"400":{"$ref":"#/components/responses/BadRequestAfterAdmission"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/wallets/copyable":{"get":{"operationId":"listCopyableWallets","summary":"The public copyable shortlist","description":"Every graded wallet clearing the public shortlist bar — farming-clean, CopyGrade Score at or above the shortlist minimum, at least one fill in the trailing 30 days — best score first, with the graded total as the denominator. `bar` states the bar in words so it is never mistaken for the Scout's stricter four-part copyable predicate.","tags":["wallets"],"security":[{},{"apiKey":[]}],"x-scopes":["read"],"x-cost":"1 keyless slot, or 1 quota unit on a key","parameters":[{"name":"limit","in":"query","required":false,"description":"Rows to return, 1–25 (default 10).","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"The shortlist.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CopyableList"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/wallets/screen":{"get":{"operationId":"screenWallets","summary":"Screen the graded index","description":"Ranked graded wallets under a small, closed filter set — the Scout table as JSON, best score first. An unset filter means \"any\"; there is no hidden default view. An unknown query parameter is a 400, never ignored, so a misspelt filter cannot silently return the unfiltered set.","tags":["wallets"],"security":[{},{"apiKey":[]}],"x-scopes":["read"],"x-cost":"1 keyless slot, or 1 quota unit on a key","parameters":[{"name":"verdict","in":"query","required":false,"description":"Verdict band: `pos` (copy candidate), `cau` (caution), `neg` (avoid).","schema":{"$ref":"#/components/schemas/Verdict"}},{"name":"farming","in":"query","required":false,"description":"`clean` = no farming-risk flag; `flagged` = watch or severe.","schema":{"$ref":"#/components/schemas/FarmingFilter"}},{"name":"minScore","in":"query","required":false,"description":"Minimum CopyGrade Score, 1–100.","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"category","in":"query","required":false,"description":"One of the canonical market categories.","schema":{"type":"string","enum":["Politics","Sports","Crypto","Economy","World","Tech","Culture","Science"]}},{"name":"active30d","in":"query","required":false,"description":"Only wallets with at least one fill in the trailing 30 days (`true`/`1`/`false`/`0`).","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Rows to return, 1–50 (default 20).","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"The page of matching wallets, with the applied filters echoed back.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Screen"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/wallets/score:batch":{"post":{"operationId":"scoreWalletsBatch","summary":"Score up to 200 wallets in one call","description":"Up to 200 addresses in one call (as sent — duplicates are refused past the cap, not collapsed; what passes is lower-cased and de-duplicated in submission order). The answer carries the single-wallet payload for every address CopyGrade holds a score for and a `found: false` miss with the live-grade hint for the rest, one entry per distinct address in submission order. An all-miss batch is still a 200. The literal `score:batch` segment is the path — the `:verb` custom-method convention.","tags":["wallets"],"security":[{"apiKey":[]}],"x-scopes":["read"],"x-cost":"1 quota unit per distinct address, spent whole before the read or write, or refused whole","requestBody":{"required":true,"description":"The addresses to grade, 1–200 entries as sent. Any other field is a 400. A body over 64 KB is a 413, on the declared length before a byte is read and on the bytes received before parsing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressList"},"example":{"addresses":["0x4a8c0000000000000000000000000000000000a1"]}}}},"responses":{"200":{"description":"One result per distinct address, in submission order.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/BatchScore"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/watchlist":{"get":{"operationId":"getWatchlist","summary":"The key owner's watchlist","description":"The owner's watched wallets, newest watch first, at most 1,000 rows (`truncated: true` says the list reached that bound and `count` is not the total). No scores: a list read costs one unit, and N scores for one unit would be what `score:batch` meters per address — pair the two. The list, notes included, is account-private data, so the read needs the `watchlist:write` scope too.","tags":["watchlist"],"security":[{"apiKey":[]}],"x-scopes":["watchlist:write"],"x-cost":"1 quota unit","responses":{"200":{"description":"The watchlist.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Watchlist"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"operationId":"watchWallets","summary":"Add wallets to the watchlist","description":"Watches every indexed address in the body. One result per distinct address in submission order: `added` (a new watch), `watched` (already was — a harmless no-op that keeps the owner's note), or `not_indexed` with the live-grade hint (the sync has not reached the address, so there is no wallet row to watch). A miss still costs its unit — the lookup is the work.","tags":["watchlist"],"security":[{"apiKey":[]}],"x-scopes":["watchlist:write"],"x-cost":"1 quota unit per distinct address, spent whole before the read or write, or refused whole","requestBody":{"required":true,"description":"The addresses to watch; a single wallet is a one-element list. Any other field is a 400. A body over 64 KB is a 413, on the declared length before a byte is read and on the bytes received before parsing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressList"},"example":{"addresses":["0x4a8c0000000000000000000000000000000000a1"]}}}},"responses":{"200":{"description":"One result per distinct address, in submission order.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WatchResults"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"operationId":"unwatchWallets","summary":"Remove wallets from the watchlist","description":"Stops watching every address in the body. One result per distinct address in submission order: `removed`, or `not_watched` (never was, already gone, or not indexed). The JSON body travels on `DELETE` exactly as on `POST`; a proxy that strips `DELETE` bodies gets the 400 \"JSON object\" refusal, which costs nothing.","tags":["watchlist"],"security":[{"apiKey":[]}],"x-scopes":["watchlist:write"],"x-cost":"1 quota unit per distinct address, spent whole before the read or write, or refused whole","requestBody":{"required":true,"description":"The addresses to stop watching; a single wallet is a one-element list. Any other field is a 400. A body over 64 KB is a 413, on the declared length before a byte is read and on the bytes received before parsing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressList"},"example":{"addresses":["0x4a8c0000000000000000000000000000000000a1"]}}}},"responses":{"200":{"description":"One result per distinct address, in submission order.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/UnwatchResults"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/farming":{"get":{"operationId":"listFarmingWebhooks","summary":"The key owner's farming-webhook subscriptions","description":"Every subscription on the account, oldest first — at most 5. Never the signing secret: it is shown once, on the `POST` that minted it. A subscription the cron disabled after 10 consecutive failed deliveries shows `disabledAt`; delete it and subscribe again to re-arm it with a fresh secret.","tags":["webhooks"],"security":[{"apiKey":[]}],"x-scopes":["webhooks:write"],"x-cost":"1 keyless slot, or 1 quota unit on a key","responses":{"200":{"description":"The subscriptions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookList"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"operationId":"subscribeFarmingWebhook","summary":"Subscribe a URL to farming deliveries","description":"Registers an `https` URL to receive the `farming` delivery (see `webhooks`) whenever a wallet on the owner's watchlist trips a `watch` or `severe` farming finding — the same raise-decision, dedup and hourly cadence as the in-app alert, so the two can never disagree on what fired — which also means a farming kind the account muted (Account → Notifications, or the per-wallet toggle) raises no alert and so delivers no webhook. The URL must be `https`, carry no credentials, be at most 500 characters, and resolve only to public addresses (a private, loopback, link-local or metadata host — by literal or by DNS — is refused). The answer carries the signing `secret` **once**; store it. Cap: 5 subscriptions per account; the same URL twice is a 409 (delete it to rotate its secret).","tags":["webhooks"],"security":[{"apiKey":[]}],"x-scopes":["webhooks:write"],"x-cost":"1 keyless slot, or 1 quota unit on a key","requestBody":{"required":true,"description":"`{ \"url\": \"https://…\" }`. Any other field is a 400. A body over 4 KB is a 413.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUrlBody"}}}},"responses":{"200":{"description":"The new subscription, with its secret — shown only here.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookSubscriptionCreated"}}}}}},"400":{"$ref":"#/components/responses/WebhookUrlRejected"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/farming/{id}":{"delete":{"operationId":"unsubscribeFarmingWebhook","summary":"Remove a farming-webhook subscription","description":"Removes one of the owner's subscriptions by id. Deliveries to it stop with the next hourly run. Re-subscribing the same URL mints a new secret — this is how a secret is rotated. An id that is not one of the owner's (or is already gone) is a 404, without saying which; a malformed id is a free 400.","tags":["webhooks"],"security":[{"apiKey":[]}],"x-scopes":["webhooks:write"],"x-cost":"1 keyless slot, or 1 quota unit on a key","parameters":[{"$ref":"#/components/parameters/WebhookId"}],"responses":{"200":{"description":"Removed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Vary":{"$ref":"#/components/headers/Vary"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookRemoved"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/WebhookNotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/openapi.json":{"get":{"operationId":"getOpenApiDocument","summary":"This document","description":"The OpenAPI 3.1 description of every `/api/v1/*` route, built from the same constants the routes enforce. Public, no budget, cached for a day at the edge; it changes only on deploy.","tags":["meta"],"security":[{}],"x-scopes":[],"x-cost":"none","responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"webhooks":{"farming":{"post":{"summary":"A watched wallet tripped a farming finding","description":"Delivered by the hourly alert run to every live subscription of the wallet's watcher, once per in-app `farming` alert raised — `id` is that alert's id, so a consumer can de-duplicate. The request is a `POST` with `Content-Type: application/json`, `User-Agent: CopyGrade-Webhooks/1.0`, a 5-second timeout and **no redirect following** (a 3xx is a failed delivery). Any 2xx is success; anything else counts as a failure, and 10 consecutive failures disable the subscription.\n\n**Verify every delivery.** `X-CopyGrade-Signature` is `t=<unix seconds>,v1=<hex>`, where `v1` is HMAC-SHA256 under the subscription's secret over the string `\"<t>.<raw body>\"` — the raw bytes received, before parsing. Recompute, compare in constant time, and refuse a `t` further than 300 seconds from your clock (the replay bound). The same scheme Stripe uses, so a Stripe-webhook verifier adapts in one line.\n\n`X-CopyGrade-Event` names the event (`farming` — the only one today) and `X-CopyGrade-Delivery` repeats the body's `id`. The body is additive-only from here: new fields may appear, none will be removed or change meaning.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FarmingWebhookEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else is retried on the next raise only — there is no per-delivery retry — and counts toward the disable threshold."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"lv_sk_…","description":"A Pro API key, minted at Account → API access and shown once. Carries the scopes its owner picked at mint (`read` always; `watchlist:write` and `webhooks:write` optionally), an optional expiry, and its own quota of 1,000 quota units per UTC day plus 60 requests a minute per key. Rotate a key to swap its secret with a one-hour grace; revoke a leaked one."}},"parameters":{"Address":{"name":"address","in":"path","required":true,"description":"The wallet's Polymarket (Polygon) address: `0x` followed by 40 hex characters, any case.","schema":{"$ref":"#/components/schemas/Address"},"example":"0x4a8c0000000000000000000000000000000000a1"},"WebhookId":{"name":"id","in":"path","required":true,"description":"The subscription's id, as `GET` or `POST` returned it.","schema":{"type":"string","format":"uuid"}}},"headers":{"X-RateLimit-Limit":{"description":"The caller's allowance: 200 on the keyless tier (per IP, per day), 1,000 on a key (per UTC day).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Units left in the allowance after this call. The keyed-only surfaces also send it on a quota 429, so a refused batch or watchlist call can be shrunk to fit; the two-tier reads send it on a 200 only.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Keyed tier only: epoch seconds of the next UTC midnight, when the key's quota rolls. Absent on the keyless tier, whose windows are rolling rather than calendar-aligned.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying. Omitted on a 429 whose wait rounds to zero — retry at once.","schema":{"type":"integer"}},"Vary":{"description":"Always `Authorization`: a keyless answer is shared-cacheable and a keyed one is `no-store`, so a cache must never serve one tier the other's response.","schema":{"type":"string","const":"Authorization"}}},"schemas":{"Address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Polymarket (Polygon) wallet address: `0x` followed by 40 hex characters, any case."},"Verdict":{"type":"string","enum":["pos","cau","neg"],"description":"Verdict band: `pos` copy candidate, `cau` caution, `neg` avoid."},"FarmingFilter":{"type":"string","enum":["clean","flagged"],"description":"`clean` = no farming-risk flag; `flagged` = watch or severe."},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"One sentence saying what was refused and why."},"hint":{"type":"string","format":"uri","description":"On a 404: the free live grade for the address, which also queues the wallet for the index."}}},"AddressList":{"type":"object","required":["addresses"],"additionalProperties":false,"properties":{"addresses":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/Address"},"description":"1–200 addresses as sent, each `0x` + 40 hex, any case; de-duplicated after validation, so the result's length (and the call's cost) is the distinct count."}}},"SubScores":{"type":"object","description":"The five sub-scores behind the CopyGrade Score, each 0–100.","required":["authenticity","sharpe","drawdown","consistency","farming"],"properties":{"authenticity":{"type":"number","description":"Edge authenticity — skill versus luck and variance."},"sharpe":{"type":"number","description":"Risk-adjusted return, Sharpe-style."},"drawdown":{"type":"number","description":"Drawdown resilience."},"consistency":{"type":"number","description":"Consistency and regime stability."},"farming":{"type":"number","description":"The farming-risk sub-score (higher is cleaner)."}}},"Farming":{"type":"object","required":["level","signals"],"properties":{"level":{"type":"string","enum":["clean","watch","severe"],"description":"The farming-risk flag. `severe` vetoes the verdict."},"signals":{"type":"integer","minimum":0,"description":"How many farming behaviours were detected."}}},"Wallet":{"type":"object","description":"The public payload for one wallet — a deliberate subset of the verdict page: no positions, no ledger, no freshness internals.","required":["address","handle","score","verdict","label","subScores","farming","edge90d","edgeReal"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"handle":{"type":"string","description":"Display handle or ENS name."},"score":{"type":"number","minimum":0,"maximum":100,"description":"The CopyGrade Score."},"verdict":{"$ref":"#/components/schemas/Verdict"},"label":{"type":"string","description":"The verdict in plain language."},"subScores":{"$ref":"#/components/schemas/SubScores"},"farming":{"$ref":"#/components/schemas/Farming"},"edge90d":{"type":"number","description":"Headline 90-day edge (%), net of trading fees, before the copy haircut."},"edgeReal":{"type":"number","description":"Realistic 90-day edge (%), after the copy (latency) haircut."}}},"WalletListRow":{"description":"A list row: the wallet payload plus the few fields a reader needs to rank rows without a call per row.","allOf":[{"$ref":"#/components/schemas/Wallet"},{"type":"object","required":["primaryCategory","trades90d","maxDrawdownPct","trades30d"],"properties":{"primaryCategory":{"type":"string","description":"The category the wallet mostly trades."},"trades90d":{"type":"integer","minimum":0,"description":"Fills in the trailing 90 days."},"maxDrawdownPct":{"type":"number","maximum":0,"description":"Worst peak-to-trough drawdown (%), negative or zero."},"trades30d":{"type":["integer","null"],"description":"Fills in the trailing 30 days; `null` until the wallet is re-scored since the windowed columns shipped."}}}]},"CopyableList":{"type":"object","required":["bar","gradedTotal","count","wallets"],"properties":{"bar":{"type":"string","description":"The shortlist bar in words."},"gradedTotal":{"type":"integer","minimum":0,"description":"How many graded wallets the list was drawn from — the honest denominator."},"count":{"type":"integer","minimum":0},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/WalletListRow"}}}},"ScreenFilters":{"type":"object","description":"The applied filters, echoed back. An absent filter was \"any\"; `limit` is always present (the default when unset).","required":["limit"],"properties":{"verdict":{"$ref":"#/components/schemas/Verdict"},"farming":{"$ref":"#/components/schemas/FarmingFilter"},"minScore":{"type":"integer","minimum":1,"maximum":100},"category":{"type":"string","enum":["Politics","Sports","Crypto","Economy","World","Tech","Culture","Science"]},"active30d":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":50}}},"Screen":{"type":"object","required":["filters","matchedTotal","count","wallets"],"properties":{"filters":{"$ref":"#/components/schemas/ScreenFilters"},"matchedTotal":{"type":"integer","minimum":0,"description":"Size of the whole matching set, not just this page."},"count":{"type":"integer","minimum":0},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/WalletListRow"}}}},"BatchScoreResult":{"description":"One address of a batch: the wallet payload when CopyGrade holds a score, otherwise the address echoed back with the live-grade hint.","oneOf":[{"allOf":[{"type":"object","required":["found"],"properties":{"found":{"type":"boolean","const":true}}},{"$ref":"#/components/schemas/Wallet"}]},{"type":"object","required":["found","address","hint"],"properties":{"found":{"type":"boolean","const":false},"address":{"$ref":"#/components/schemas/Address"},"hint":{"type":"string","format":"uri"}}}]},"BatchScore":{"type":"object","required":["count","found","results"],"properties":{"count":{"type":"integer","minimum":1,"description":"Distinct addresses graded — also the quota units the call cost."},"found":{"type":"integer","minimum":0,"description":"How many of them CopyGrade holds a score for."},"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchScoreResult"},"description":"One entry per distinct address, in submission order."}}},"WatchlistRow":{"type":"object","required":["address","handle","watchedAt","note"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"handle":{"type":"string"},"watchedAt":{"type":"string","format":"date-time","description":"When the owner started watching it."},"note":{"type":["string","null"],"description":"The owner's private note, plain text."}}},"Watchlist":{"type":"object","required":["count","truncated","wallets"],"properties":{"count":{"type":"integer","minimum":0,"description":"Rows returned — the whole list unless `truncated`."},"truncated":{"type":"boolean","description":"Whether the list reached the 1,000-row read bound; if so `count` is not the total."},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/WatchlistRow"},"description":"Newest watch first."}}},"WatchResult":{"oneOf":[{"type":"object","required":["address","status"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"status":{"type":"string","enum":["added","watched"]}}},{"type":"object","required":["address","status","hint"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"status":{"type":"string","const":"not_indexed"},"hint":{"type":"string","format":"uri","description":"The free live grade, which also queues the wallet for the index."}}}]},"WatchResults":{"type":"object","required":["count","added","results"],"properties":{"count":{"type":"integer","minimum":1,"description":"Distinct addresses asked for — also the quota units the call cost."},"added":{"type":"integer","minimum":0,"description":"How many became new watches."},"results":{"type":"array","items":{"$ref":"#/components/schemas/WatchResult"}}}},"UnwatchResult":{"type":"object","required":["address","status"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"status":{"type":"string","enum":["removed","not_watched"]}}},"UnwatchResults":{"type":"object","required":["count","removed","results"],"properties":{"count":{"type":"integer","minimum":1},"removed":{"type":"integer","minimum":0},"results":{"type":"array","items":{"$ref":"#/components/schemas/UnwatchResult"}}}},"WebhookUrlBody":{"type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","maxLength":500,"description":"`https` only; no credentials; a public host (by literal and by DNS)."}}},"WebhookSubscription":{"type":"object","required":["id","url","createdAt","lastDeliveredAt","lastFailedAt","failureCount","disabledAt"],"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"lastDeliveredAt":{"type":["string","null"],"format":"date-time","description":"The last successful delivery."},"lastFailedAt":{"type":["string","null"],"format":"date-time","description":"The last failed delivery."},"failureCount":{"type":"integer","minimum":0,"description":"Consecutive failures since the last success; reset to 0 by a success."},"disabledAt":{"type":["string","null"],"format":"date-time","description":"Set when 10 consecutive deliveries failed. A disabled subscription receives nothing; delete and re-subscribe to re-arm it."}}},"WebhookSubscriptionCreated":{"allOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string","description":"The signing secret (`cg_whsec_` + 64 hex). Shown only in this answer — store it; `GET` never returns it."}}}]},"WebhookList":{"type":"object","required":["count","webhooks"],"properties":{"count":{"type":"integer","minimum":0},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"},"description":"Oldest first."}}},"WebhookRemoved":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"removed"}}},"FarmingWebhookEvent":{"type":"object","required":["id","event","createdAt","level","wallet","message","verdictUrl"],"properties":{"id":{"type":"string","format":"uuid","description":"The in-app alert's id — one delivery per alert per subscription; de-duplicate on it."},"event":{"type":"string","const":"farming"},"createdAt":{"type":"string","format":"date-time","description":"When the alert was raised."},"level":{"type":"string","enum":["watch","severe"],"description":"The farming level the wallet tripped. `severe` is the veto — a copier stops; `watch` is a review."},"wallet":{"type":"object","required":["address","handle"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"handle":{"type":"string","description":"The display handle, or the address when there is none."}}},"message":{"type":"string","description":"The sentence the in-app feed shows for this alert."},"verdictUrl":{"type":"string","format":"uri","description":"The wallet's public Copy Verdict page (`/wallet/{address}`)."}}}},"responses":{"BadRequestAfterAdmission":{"description":"A malformed address — `0x` followed by 40 hex characters was expected. This route admits the caller before checking the address, so the 400 has already cost one keyless slot or one quota unit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"An unknown query parameter or body field, a malformed address in a body, or a value outside its range — the message names the field. The list and body routes parse before admitting, so this costs nothing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"No `Authorization` header on a keyed-only surface, or a missing, malformed, unknown, revoked or expired key. Nothing debited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key's owner is no longer on an active Pro plan, or the key lacks the scope this operation asserts (`x-scopes`). Nothing debited — with two exceptions, both after admission and both saying in the body that the unit(s) were spent: a watchlist `POST` whose write is refused by the plan cap (the plan lapsed between verification and the write), and a webhook `POST` past the per-account subscription cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The account already subscribes this URL. Costs its unit (the lookup is the work). Delete the existing subscription and subscribe again to mint a new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WebhookNotFound":{"description":"No subscription with this id on the account — not the owner's, or already removed; the answer does not say which. Costs its unit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WebhookUrlRejected":{"description":"Not a JSON object, an unknown field, a missing `url`, or a URL refused by shape — not `https`, embedded credentials, over the length cap, a private / loopback / link-local / metadata host by literal — all free, before any key is looked up. A URL whose hostname resolves to a private address (or does not resolve) is also a 400, but after admission, so it has cost its unit: the DNS check runs only for an admitted key, so an unauthenticated caller cannot use this route as a resolver.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"CopyGrade has not indexed this address — a real miss from a database that answered, never a failed lookup. `hint` is the free live grade, which also queues the wallet for the index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"The body is over 64 KB, declared or received. Costs nothing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"The keyless per-IP budget (20 a minute and 200 a day per IP), the per-IP throttle ahead of key verification, the key's per-minute burst limit, or the key's daily quota is spent — or the call's cost does not fit what is left today, in which case it is refused whole, nothing debited, and `X-RateLimit-Remaining` says what remains.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Three meanings, told apart by `Retry-After`: the keyed tier is deferred (`86400` — keys are minted but the tier is not open in this environment); the key could not be verified (no `Retry-After` — fail-closed, \"could not check\" never reads as \"checked and fine\", nothing debited); or the read or write itself failed after admission (`30`), in which case the call has already spent its slot or units — a keyed batch, watchlist or webhook body says so.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}