Developer

The Developer portal is where Quant subscribers manage API keys, the MCP server, webhooks and bulk exports, and watch their requests and usage.

Quant tier

Pro does not include API or webhook access. Without Quant, the portal opens with sample data.

What you get#

The Developer portal Overview: a left-hand menu (Overview, API keys, Webhooks, Exports, Logs, Usage, Events and links to the API reference), quickstart code using your newest key, today's quota, a requests chart with errors, API traffic by version and webhook health.
The portal's Overview. Each section has its own page in the left-hand menu.
  • 10,000 API requests per day, reset at midnight UTC, with up to 100 a minute per key.
  • Whale trades from Polymarket and Kalshi, with insider scores on Polymarket buys, resolved outcomes with P&L and ROI, wallets, clusters and market signals.
  • The Smart Money board as data: the ranked leaderboard, the cohort's trades, flow by category and each wallet's score history, with the methodology version on every response.
  • Outbound webhooks across 16 event types, signed to the Standard Webhooks spec.
  • Crypto markets and the Bitcoin forecast as data: Polymarket's open crypto price markets by asset, window and type, as the Crypto page lists them; the model's probability distributions, every supporting market with its weight, and the past year of hourly runs for backtesting.
  • Bulk CSV, JSON and Parquet exports up to 100,000 rows per job.
  • Bulk backtests: up to 50 Orca copy-trading backtests per request, each replayed at the traders' own prices and at prices a copier could have gotten, with returns, drawdown and daily equity curves.
  • The full methodology of the Smart Money Score, the Bitcoin forecast and the insider score, on the portal's Methodology page.

Every endpoint, parameter and field is in the API reference, which you can read without an account.

Get an API key#

  1. Click Developer in the sidebar, then API keys, then Create key.
  2. Give it a name ("production", "laptop") so you can tell your keys apart, and choose its access: Full, Read only, or Restricted to pick scopes (read, watchlist:write, webhooks:write, exports:write, backtests:write). A key used only to read data should be read only.
  3. Choose when it expires: in 30, 90 or 365 days, on a date you pick, or never. Keys close to expiry are flagged on the Keys page.
  4. Copy the key. It is shown once: a banner keeps it on screen across the portal until you click I've saved it, and after that only its prefix (pwhk_a1b2…) is shown. If you lose it, rotate or revoke it and use the new one.
The API keys page: a table of keys with name, key prefix, access (Full or Read only), created, last used, expiry and status (Active, Expiring), and a collapsed list of revoked keys.
API keys. Each key shows its prefix, access, last use and expiry; the menu at the end of a row renames, rotates or revokes it.

An account holds up to five live keys. Rotate issues a replacement and keeps the old key working for 24 hours, so you can deploy the new one without downtime. Revoke stops a key at once.

Make your first request#

Put the key in an environment variable rather than in your code, and send it as a bearer token. This asks for the five latest trades of $25,000 or more:

Terminal
export POLYWHALER_API_KEY='pwhk_...'

curl 'https://polywhaler.com/api/v2/trades?minAmount=25000&limit=5' \
  -H "Authorization: Bearer $POLYWHALER_API_KEY"

The response is {data, meta, pagination}. Every endpoint has cURL, Node and Python samples in the API reference, and every GET endpoint also has a Try it panel. The portal's Overview has the same samples, and its checklist ticks off your first request once the API has seen it.

The API reference open at List whale trades: query parameters on the left; on the right the cURL sample, the example response, and a Try it panel that has sent GET /v2/trades?limit=5 and shows a 200 response with its request id and headers.
Try it in the API reference. The request uses the key you paste at the top of the page and shows up in your Logs.

Connect an AI agent (MCP)#

Polywhaler runs an MCP server at https://polywhaler.com/api/mcp, so Claude, ChatGPT, Cursor, VS Code, Codex and other MCP clients can query whale trades, wallets, the Smart Money board, markets and the Bitcoin forecast for you. Most clients need only that URL: they sign in with your Polywhaler account, and you approve the connection in the browser. In Claude, open Customize › Connectors, choose + Add, then Add custom connector, paste the URL and sign in. In Claude Code, add the server, then run /mcp and choose Authenticate:

Terminal
claude mcp add --transport http --scope user polywhaler https://polywhaler.com/api/mcp

The portal's MCP server page has the setup for each client and toolsets that keep the tool list short. MCP server covers every tool, the setup for ChatGPT, Cursor, VS Code and Codex, and how to disconnect.

  • Each tool is one API endpoint, and each call is one request against your daily quota. Calls appear in Logs with the polywhaler-mcp user agent.
  • A signed-in app can read; you can also let it follow and unfollow wallets when you approve it. Apps you connect are listed on the MCP server page, where you can disconnect them.
  • Scripts and clients without sign-in send an API key as a Bearer token instead. A read-only key gets every read tool; a key with watchlist:write can also change your watchlist.
  • List tools return 20 rows unless the agent asks for more, and page with the same cursor as the API.

Set up a webhook#

Webhooks push events to a URL you control: whale and Smart Money trades, wallets you follow, rank and score changes, the daily leaderboard, clusters, the Black Swan radar, The Prophet, the Bitcoin forecast and your own exports. A Polymarket trade event goes out a few seconds after the fill, read from Polymarket's live trade stream, and a Kalshi one about a minute after. Every event, its payload and its filters are listed in Webhook events.

  1. Open Webhooks and click Add endpoint.
  2. Enter the URL Polywhaler should POST to. It must be https on port 443 or 8443, on a public address: private, loopback and cloud-metadata addresses are refused.
  3. Pick the events, grouped by kind. Filters (size, category, side, insider score, rank, wallets) appear for the events they apply to, and a sample payload shows what will arrive.
  4. Save, and copy the signing secret (whsec_…). Like a key, it is shown once. Use it to verify each delivery.
  5. Use Send test to fire a sample event at your endpoint before going live.
The Add endpoint sheet: an endpoint URL, an optional description, an Enabled switch, and the event picker grouped by kind, with trade.smart_money ticked in the Trades group and the Smart Money group below it; buttons to Cancel, Save and send test, or Add endpoint.
Adding an endpoint. Events are grouped by kind; filters for the ticked events appear further down.

Each endpoint has its own page: the last day's success rate and latency, every delivery with its attempts, response and payload, and Redeliver for any of them. From there you can pause and resume the endpoint, change its events and filters, and rotate the secret (the old one keeps signing for 24 hours). An endpoint that keeps failing is disabled and you are emailed; re-enable it and use Recover failed deliveries… to resend what it missed.

An endpoint's page: the last 24 hours (deliveries, success rate, p95 latency, retrying), the delivery list filtered by All, Succeeded, Failed or Retrying, and a retrying trade.whale delivery open beside it with its status, attempts, next retry, webhook-id and the timeline of attempts.
An endpoint's deliveries. This one is retrying after two 503s and two timeouts, with the next attempt scheduled; once a delivery has finished, Redeliver sends it again.

Answer with any 2xx within 10 seconds. Failed deliveries are retried for about a day, and every retry carries the same webhook-id, so use it to drop duplicates.

Sections of the portal#

  • Overview: a get-started checklist, requests and errors over time, your quota, recent errors, webhook health, traffic by API version, and quickstart code.
  • API keys: create, rename, rotate and revoke keys, with each key's access, expiry and when it was last used.
  • MCP server: connect Claude, ChatGPT, Cursor and other AI agents, with the setup for each client, the tools it gets and the apps you have connected.
  • Webhooks: your endpoints with their health and a week of success rates. Open one for its deliveries, tests, secret rotation, pause and recovery.
  • Exports: start a bulk export of trades or outcomes and download finished files.
  • Backtests: start a batch of copy-trading backtests (paste wallets, run each on its own or all together, pick a window and sizing), then sort the runs by return, drawdown or win rate, chart any run's equity curves and download the batch as CSV. See Bulk backtests.
  • Logs: every API request from the last 14 days, filtered by status, method, endpoint, key and version, with a detail pane per request and a live mode.
  • Usage: requests by day or hour for up to 90 days, by status, endpoint (with p50 and p95 latency), key and version, and a CSV download.
  • Events: the webhook event catalog, with each event's schema, an example and the headers it is sent with.
  • Methodology: the full specification of the Smart Money Score, the Bitcoin forecast and the insider score, with every weight, constant and threshold, for the version each one runs on now.
The Logs page: filter chips for date, status, method, endpoint, key and version; today's requests with status, method, path, latency and time; and one request open in the detail pane with its request id, time, key, latency, version, IP, user agent, response size and query parameters.
Logs, with one request open. Rows are grouped by day; the arrows in the detail pane step through them.
The Usage page for the last 30 days: totals for requests, error rate, the peak day and p50 and p95 latency, today's quota, and daily requests stacked by status (2xx, 4xx, 429, 5xx).
Usage over 30 days. Below the chart, the same range broken down by endpoint, key and API version.

The menu also links to the API reference, the OpenAPI document and the changelog.

API versions#

v2 (/api/v2) is the current API and the one these docs describe. v1 (/api/v1) is frozen: it keeps working for existing integrations and gets security fixes, nothing new. The same key works on both, and both count against one quota.

v1 retirement

v1 stops answering on April 16, 2027. Until then every v1 response carries Deprecation and Sunset headers.

If your account has called v1 in the last week, the Overview, Keys and Logs pages say so, with how many requests and from how many keys. Migrating from v1 maps every v1 route to its v2 successor.

Calling the API#

Authentication#

Keys are bearer tokens and start with pwhk_. Send them as Authorization: Bearer pwhk_.... A key belonging to a free or Pro account is rejected: the API is Quant only, and the rejection says so rather than returning an empty result. A key without the scope an endpoint needs is refused with insufficient_scope.

Base URL#

Everything lives under https://polywhaler.com/api/v2.

Filters worth knowing#

  • venue on /v2/trades takes polymarket (the default), kalshi or all. See venues.
  • sports takes include, exclude or only. Trade lists default to include, so pass sports=exclude to match Home, which leaves them out. The Smart Money leaderboard works the other way: it leaves sports traders out unless you pass sports=include.
  • Trade size: Polymarket trades are stored from $2,000, and /v2/trades applies no floor above that unless you pass minAmount. Kalshi trades start at $5,000, or $10,000 for sports and for 15-minute and hourly markets.
  • /v2/smart-money/trades returns the ranked cohort's trades (maxRank or minScore), and include=smartMoney on /v2/trades adds each wallet's standing. See scores and badges.
  • /v2/outcomes?vindicated=true returns low-probability calls that came true, and /v2/smart-money/flow returns net capital flow by category.

API changes#

Every change a client can notice, v1 and v2, is in the API changelog, newest first.

When you outgrow this#

If you need higher rate limits or a dedicated lane, reach out by email.