For developers

Build whale-tracking bots on clean Polymarket data

Clean data, farmer-filtered, NegRisk-corrected. Public REST API for builders. Free tier for community bots, Premium $19.99/mo for production loads, Business $99/mo for products and teams.

Free tier on public endpoints ยท Premium $19.99/mo for 600 req/min ยท Business $99/mo for 3,000 req/min, screener, webhooks and a commercial license ยท Time to first request: 60 seconds

Live API example (copy-paste, returns real data):

$ curl -s "https://orcalayer.com/api/leaderboard?period=24h&filter=smart" \
    | jq '.traders[0]'

{
  "wallet": "0x2005d16a84ceefa912d4e380cd32e7ff827875ea",
  "display_name": "RN1",
  "win_rate": 55.1,
  "market_win_rate": 67.2,
  "total_pnl": 9902400,
  "roi": 2.5,
  "is_smart": true,
  "role_profile": "Whale"
}
OrcaLayer mascot

โ˜… Open source ยท on GitHub

Official libraries & tools

github.com/orcalayer โ†’

MIT-licensed, built in the open. Clone an example, wire the SDK into your stack, or drop our data straight into your AI client.

orcalayerPublic

orcalayer-mcpโ†’

Model Context Protocol server. Pipe live whale trades, smart-money flags and wallet PnL straight into Claude, Cursor, or any MCP client. Hosted at https://orcalayer.com/mcp (no install) or run locally; setup guide at /docs/mcp.

$uvx orcalayer-mcp
mcpclaudepolymarket
PythonMITUpdated Jun 2026
orcalayerPublic

orcalayer-pythonโ†’

Official Python client for the OrcaLayer API. Anonymous access to public endpoints; drop in a Premium key for premium data and higher limits.

$pip install orcalayer
sdkrest-apiwhales
PythonMITUpdated Jun 2026
orcalayerPublic

whale-watchlist-monitorโ†’

Reference bot. Watches a wallet list and alerts on new, closed and resized positions โ€” Telegram, Discord or stdout.

$git clone โ€ฆ/whale-watchlist-monitor
botalertstelegram
PythonMITUpdated Jun 2026
orcalayerPublic

polymarket-backtest-cookbookโ†’

Ready-to-run notebooks to backtest copy-trade strategies on Polymarket smart-money data โ€” follow one whale, follow the smart-money consensus, or compare raw vs farmer-filtered leaderboards. Public leaderboard is keyless; full backtests use a Premium API key. These are in-sample: the wallets come from today's leaderboard, so the curves describe the past, not a copy strategy you could have run. For a walk-forward test see polymarket-copy-trading-whales-backtest below.

$git clone โ€ฆ/polymarket-backtest-cookbook
backtestingcopy-tradingnotebooks
JupyterMITUpdated Jun 2026
orcalayerPublic

orcalayer-skillโ†’

Agent skill (SKILL.md) that teaches Claude Code, Cowork or Desktop to do Polymarket smart-money research with OrcaLayer โ€” farmer-filtered leaderboards, NegRisk-corrected win rates, per-wallet backtests and the ISW Ukraine overlay. Same capabilities as the MCP server, with no server to run.

$git clone โ€ฆ/orcalayer-skill
agent-skillclaudepolymarket
MarkdownMITUpdated Jun 2026

What you can build

Trading bot

Auto-execute trades when smart-money consensus crosses your threshold. Poll the recent-trades endpoint, react to position shifts. Premium tier provides 600 req/min for real-time strategies. NegRisk correction built into wallet responses.

Community alerts bot

Notify your Discord or Telegram community when whales move $50K+ on Polymarket. Filter by category, wallet, or threshold. The free public stream covers most community-sized bots; Premium handles high-frequency setups.

Custom dashboard

Embed Polymarket whale data on your site with a handful of fetches. Track specific wallets, markets, or categories. JSON responses, CORS-friendly for browser clients. Works with React, Vue, plain HTML.

Research notebook

Jupyter or Colab analysis: fetch resolved markets, calculate true returns minus hedge offsets, identify patterns in whale entry timing. Public methodology, reproducible by anyone โ€” academic researchers welcome.

Data you can pull

Dozens of endpoints, farmer-filtered and NegRisk-corrected. A taste below โ€” full reference at /docs/api.

Free ยท no key

  • โ€ข Wallet profiles, PnL, positions, similar traders
  • โ€ข Market search + hot markets with whale skew
  • โ€ข Farmer-filtered leaderboard
  • โ€ข Smart-money flow by category
  • โ€ข Whale clusters, top movers, 24h whale volume

Premium ยท $19.99/mo

  • โ€ข Conviction clusters โ€” where smart money agrees
  • โ€ข AI wallet analysis โ€” an LLM dossier per wallet
  • โ€ข Whale backtest + full resolved history
  • โ€ข Big-position alerts + whale-alert feed
  • โ€ข Per-trade history with date-range slicing
  • โ€ข Live whale trade feed (SSE) โ€” sub-second relay with live settlement_type (100.000% verified on MINT/MERGE)
  • โ€ข Indexed trade stream (SSE) with entry_type MINT/MERGE flags NEW
  • โ€ข ISW territory webhooks โ€” push, not poll

Business ยท $99/mo

  • โ€ข Everything in Premium
  • โ€ข Wallet screener: rank every tracked wallet by P&L, ROI, win rate or profit factor in one request
  • โ€ข Webhooks: whale and wallet trades pushed to your server, signed
  • โ€ข A wallet's full trade history as CSV (since 2022)
  • โ€ข 3,000 requests/minute, no daily cap
  • โ€ข Commercial license: build products for other people

Two layers โ€” pick the right one

Positions & performance (overview, positions, closed, whale backtest, leaderboard) are netted, NegRisk-corrected and human-readable โ€” use these for copy-trade analysis and dashboards. The raw per-wallet trade feed (/wallet/{addr}/trades) is the advanced layer: raw fills tagged with entry_type โ€” settlement mechanics, not trader intent (MINT = matched an opposite-side buyer, the protocol minted the pair between the two counterparties; MERGE = two sells matched, pair burned to USDC; COMPLEMENTARY = matched an existing holder; null = legacy V1). ~80% of fills are MINT. side is the CTF operation direction, not an exchange buy/sell. Reach for it only when you want event-level granularity โ€” full details in the API reference.

Two live streams, pick by need. Raw relay (GET /api/public/v1/live/trades, SSE, Premium) is the speed path: a relay of the exchange's public activity feed, so every event names one wallet โ€” the taker. Sub-second + a fixed 700ms buffer, and since 22.07 every event carries settlement_type (MINT/MERGE/COMPLEMENTARY/null) derived live by tx-grouping โ€” shadow-verified 100.000% accurate on MINT/MERGE (54,470 tx, zero mislabels; coverage 91.8%, null = honest refusal). Indexed stream (GET /api/public/v1/live/trades-indexed?types=mint,merge) is the completeness path: per-fill entry_type from on-chain OrdersMatched, both counterparties and market metadata on every fill, typically 20โ€“45 seconds after on-chain confirmation โ€” the server-side types filter accepts mint, merge, complementary. Both labels are settlement mechanics, not trader intent โ€” a MINT means the order matched an opposite-side buyer, not that the wallet deliberately split collateral. Reading it correctly matters: a MINT with SELL on YES is an entry into NO, not an exit. Maker-side attribution is the exclusive part: for arbitrary wallets it exists nowhere in Polymarket's public API โ€” the market stream (book, price changes, last trade price) carries no addresses at all; the public activity feed names only the taker; and full fills with maker orders are served solely on the authenticated user channel, for your own trades only. Recovering who sat on the maker side of someone else's fill requires indexing the chain, which is exactly what this stream does โ€” that is also why it trails the raw relay by tens of seconds. It matters because patient flow rests on the book: a wallet that works limit orders is a maker, and a taker-only feed simply does not name it. Both streams are live-only โ€” no replay on reconnect, so keep a REST poll as your fallback.

Start building

Python SDK

Official client for the OrcaLayer API. Anonymous access works out of the box; add a Premium key for higher limits and Premium endpoints.

Install and first call

pip install orcalayer

from orcalayer import OrcaLayer
ol = OrcaLayer()  # or OrcaLayer(api_key="YOUR_KEY")
print(ol.leaderboard(limit=5))

Source: github.com/orcalayer/orcalayer-python ยท Package: pypi.org/project/orcalayer ยท Example project: whale-watchlist-monitor โ€” watches a wallet list and alerts on new, closed and resized positions (Telegram, Discord or stdout).

Prefer raw HTTP? Three Python snippets โ€” each runs against the live API. Replace the wallet/condition_id with your target.

Track a specific whale (full profile + smart-money flag)

import requests

WALLET = "0x7f3c8979d0afa00007bae4747d5347122af05613"

# /api/v2/wallet/{addr} is a public endpoint โ€” no API key required
r = requests.get(f"https://orcalayer.com/api/v2/wallet/{WALLET}")
data = r.json()

# Response is composed: profile / overview / stats / categories
profile = data["profile"]
stats = data["stats"]
overview = data["overview"]

print(f"Name: {profile['name'] or profile['pseudonym']}")
print(f"Total PnL: ${stats['total_pnl']:,.0f}")
print(f"Win rate: {stats['win_rate']:.1%}")
print(f"Smart Money flag: {stats['is_smart']}")
print(f"Markets traded: {overview['total_markets']}")
print(f"Median hold: {overview['median_hold_days']} days")

List hot markets with whale skew

import requests

# Markets with whale positioning (public endpoint โ€” no key needed)
r = requests.get("https://orcalayer.com/api/v2/markets/search?limit=10")
markets = r.json()["markets"]

for m in markets:
    skew = m["whales_yes"] - m["whales_no"]
    print(
        f"{m['question'][:60]:60s} "
        f"YES={m['price_yes']:.2f}  "
        f"whales={m['whales_yes'] + m['whales_no']:4d}  "
        f"skew={skew:+d}"
    )

Poll whale trades โ€” bot loop

import requests
import time
from collections import deque

API_KEY = "your_premium_key"   # premium /api/v2 endpoints use the X-API-Key header

# Bounded de-dup: remember the last 10k tx hashes, not every hash forever.
seen = set()
seen_order = deque(maxlen=10_000)

while True:
    try:
        r = requests.get(
            "https://orcalayer.com/api/v2/whales/recent-trades",
            headers={"X-API-Key": API_KEY},
            timeout=15,
        )
        r.raise_for_status()
        trades = r.json()
    except requests.RequestException as exc:
        print(f"request failed, retrying in 30s: {exc}")
        time.sleep(30)
        continue

    for trade in trades:
        key = trade["tx_hash"]
        if key in seen:
            continue
        if len(seen_order) == seen_order.maxlen:
            seen.discard(seen_order[0])   # evict oldest as the ring rolls over
        seen_order.append(key)
        seen.add(key)

        # Filter: $50K+ trades from named whales
        if trade["size_usd"] >= 50_000 and trade.get("whale_name"):
            print(
                f"WHALE: {trade['whale_name']} "
                f"${trade['size_usd']:,.0f} {trade['side']} "
                f"@ {trade['price']:.2f} on '{trade['question'][:50]}'"
            )
            # โ†’ forward to Discord / Telegram / Slack webhook

    time.sleep(30)  # Premium tier โ€” well under 600 req/min budget

Live indexed trade stream โ€” MINT/MERGE events (SSE, Premium)

# Connect with your existing Premium API key โ€” no extra setup.
# types filter: mint, merge, complementary; omit for all classified fills.
curl -N -H "Authorization: Bearer YOUR_PREMIUM_KEY" \
  "https://orcalayer.com/api/public/v1/live/trades-indexed?types=mint,merge"

# Each event: entry_type, maker, taker, both directions, price, usd_amount, market metadata.
# The maker side of arbitrary wallets is not available from Polymarket's public API at all.
# A MINT with SELL on YES = the wallet ENTERED NO โ€” not an exit.
# Live-only (no replay on reconnect) โ€” keep a REST poll as fallback.
# Typical latency: 20-45s after on-chain confirmation.

Wallet screener โ€” top sports wallets by ROI (Business)

import requests

API_KEY = "your_business_key"

r = requests.get(
    "https://orcalayer.com/api/v2/business/screener",
    headers={"X-API-Key": API_KEY},
    params={"category": "SPORTS", "active_days": 14, "min_resolved": 50,
            "min_win_rate": 58, "sort": "roi", "limit": 25},
    timeout=20,
)
r.raise_for_status()
for w in r.json()["wallets"]:
    name = w["display_name"] or w["wallet"][:10]
    print(f"#{w['rank']:>2} {name:<20} ROI {w['roi_pct']:>6}%  "
          f"WR {w['win_rate_pct']}%  PF {w['profit_factor']}  resolved {w['resolved_markets']}")

Webhooks โ€” get whale trades pushed to you, verify the signature (Business)

# 1) Register once
import requests

API_KEY = "your_business_key"
r = requests.post(
    "https://orcalayer.com/api/v2/business/webhooks",
    headers={"X-API-Key": API_KEY},
    json={"url": "https://your.app/orcalayer-hook",
          "events": ["whale_trade", "wallet_trade"],
          "filters": {"min_usd": 5000, "categories": ["SPORTS"],
                      "wallets": ["0x2a69660046d7acc4ab204d7cc5ba78b0776cd2f7"]}},
    timeout=20,
)
r.raise_for_status()
SECRET = r.json()["secret"]   # shown only once: store it

# 2) Receive and verify the signature (Flask)
import hashlib, hmac, time
from flask import Flask, request, abort

app = Flask(__name__)

@app.post("/orcalayer-hook")
def hook():
    parts = dict(p.split("=", 1) for p in request.headers["X-OrcaLayer-Signature"].split(","))
    expected = hmac.new(SECRET.encode(), f"{parts['t']}.".encode() + request.get_data(),
                        hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, parts["v1"]) or abs(time.time() - int(parts["t"])) > 300:
        abort(400)
    event = request.get_json()
    if event["type"] == "whale_trade":
        t, w = event["data"]["trade"], event["data"]["whale"]
        print(f"{w['name']} {t['action']} {t['side']} {t['usd_amount']:,.0f} USD @ {t['price']}")
    return "", 200

Export a wallet's full trade history to CSV (Business)

import time
import requests

API_KEY = "your_business_key"
wallet = "0x2a69660046d7acc4ab204d7cc5ba78b0776cd2f7"
since = int(time.time()) - 30 * 86400   # last 30 days

with requests.get(
    f"https://orcalayer.com/api/v2/business/export/wallet/{wallet}/trades.csv",
    headers={"X-API-Key": API_KEY}, params={"since": since}, stream=True, timeout=300,
) as r, open(f"{wallet}.csv", "wb") as f:
    r.raise_for_status()
    for chunk in r.iter_content(1 << 16):
        f.write(chunk)

# A file that reaches the 500k-row cap ends with "# truncated ... continue with since=<ts>":
# call again with that since and dedupe the boundary rows by tx_hash.

Authentication

Most read endpoints (wallet profiles, market search, leaderboard) are public โ€” make GET requests directly, no key. Paid endpoints take an API key in a header. The /api/public/v1/* namespace accepts either a Bearer token or X-API-Key; premium /api/v2/* endpoints (whale-alerts, whales/recent-trades, whale-flips, wallet trades) require the X-API-Key header:

# /api/public/v1/* โ€” either header works:
Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY

# premium /api/v2/* โ€” use X-API-Key:
X-API-Key: YOUR_API_KEY

Get your key after upgrading at /pricing. Keys can be rotated anytime; they expire only if you request rotation.

Rate limits

TierRequests/minuteEndpoint scope
Free~200 / min (Cloudflare-throttled)Public reads (wallet, search, leaderboard)
Premium600 / min ยท 25,000 / day+ key-gated (public/v1, premium v2)
Business3,000 / min+ screener, webhooks, CSV exports (/api/v2/business)

Rate limit response: HTTP 429. Heavy production usage or a product for others: Business (3,000 / min, commercial license).

Choose your tier

Free

$0/month

  • โ€ข Public reads: wallets, markets, leaderboard
  • โ€ข No authentication, no card
  • โ€ข Cloudflare-throttled burst-friendly
  • โ€ข Full public methodology
Try Free โ†’

Best for developers

Premium

$19.99/month

  • โ€ข 600 requests/minute default
  • โ€ข All key-gated endpoints (public/v1 + premium v2)
  • โ€ข API key auth (Bearer or X-API-Key)
  • โ€ข Personal & internal use, incl. your own bots
  • โ€ข Priority support <24h
Upgrade Premium โ†’

For products & teams

Business

$99/month

  • โ€ข Everything in Premium
  • โ€ข 3,000 requests/minute, no daily cap
  • โ€ข Wallet screener: rank by P&L, ROI, win rate
  • โ€ข Webhooks: whale & wallet trades pushed to you
  • โ€ข Wallet trade history as CSV (since 2022)
  • โ€ข Commercial license: build products for others
  • โ€ข $990/year (2 months free)
Get Business โ†’

Looking for the full dashboard without API? See /pricing for the Pro tier ($9.99/mo).

OrcaLayer API vs Polymarket native API

We use Polymarket as our source. We add: methodology, filtering, classifications, aggregations. Use both โ€” we layer, we do not replace.

FeatureOrcaLayer APIPolymarket native
Farmer detectionBuilt-in is_smart flag (farmers excluded from Smart classification)โ€”
NegRisk correctionAuto-applied to wallet PnLโ€”
Smart-money aggregationWhale head-count, conviction clusters, whale flipsโ€”
ISW Ukraine overlayLive frontline distance per marketNot in scope
Wallet PnLSingle endpoint, NegRisk-correctedMultiple calls + manual reconciliation
OpenAPI spec/api/openapi.json (auto-synced)Sparse, read client SDK
AuthenticationAPI key (Bearer or X-API-Key) or open publicPolygon wallet sign or none
MethodologyPublic, full disclosure at /methodologyProprietary
Maker-side tradesBoth sides indexed by defaultHidden by default (takerOnly=true)
Trade-history depthComplete indexed historyOffset capped at 10,000
History by date rangePer-market date slice (full rolling out)No date filter on /trades

Full side-by-side breakdown: OrcaLayer vs Polymarket Data API โ†’ โ€” maker visibility, the 10,000 offset ceiling, and full-history access compared in detail.

Reading the Gamma API directly? Its endDate is not the resolution deadline: on the markets we checked it was the kickoff, the start plus 6 hours or the start plus 7 days, depending on the market type. Field by field, with parsers โ†’

Developer FAQ

What languages can I use to query the OrcaLayer API?

Any language with HTTP client support. We provide Python examples; cURL, JavaScript/Node.js, Go, Rust, Ruby, PHP, and Java all work the same way. Responses are plain JSON, no SDK required.

How fresh is the OrcaLayer API data?

Whale trades and live markets refresh under 30 seconds end-to-end from Polygon block to API response. Wallet stats refresh within minutes after each trade. ISW Ukraine territory data refreshes daily after ISW publishes: we probe ArcGIS every ~5 seconds during the 13:00โ€“19:00 UTC publish window (every 30s otherwise) and pull the new map the moment a layer moves.

Can I use OrcaLayer API for commercial trading bots?

Yes, for your own trading: Free (public endpoints) and Premium cover personal and internal use, including your own trading bots. We do not take a cut of trades and do not require disclosure. If you build a product or service for other people on the data (a paid dashboard, terminal, app or alert service), you need Business, which includes the commercial license.

What rate limits apply on Free tier?

Public read endpoints (wallet profiles, market search, leaderboard) are open to anonymous requests, Cloudflare-throttled per IP. Premium tier provides 600 requests/minute and 25,000 requests/day (resets at 00:00 UTC; subscriptions started before 1 October 2026 keep no daily cap). Business: 3,000 requests/minute with no daily cap. Note: some /api/v2/* endpoints (whale-alerts, recent whale trades, whale-flips) are key-gated even though they live under v2 โ€” see the Authentication section above.

Does the API include farmer-filtered data by default?

Wallet responses include the is_smart flag (and exclude wallets that fail the farmer test from Smart Money classification). Leaderboard endpoints return the farmer-filtered ranking. Leaderboard, market and wallet rankings responses also carry skill_badge, a stricter mark inside Smart Money for wallets with a statistically significant record of beating the price they paid (add skill=1 to a leaderboard request to get only those). Raw wallet data is available too if you want to apply your own filter. Methodology documented at orcalayer.com/methodology.

How do I authenticate API requests?

It depends on the endpoint. Public read endpoints (e.g. /api/v2/wallet/{addr}, /api/v2/markets/search, /api/leaderboard) need no key. Paid endpoints take a key in a header: the /api/public/v1/* namespace accepts either 'Authorization: Bearer YOUR_KEY' or 'X-API-Key: YOUR_KEY'; premium /api/v2/* endpoints (whale-alerts, whales/recent-trades, whale-flips, wallet trades, market whale-trades) require the 'X-API-Key: YOUR_KEY' header. Get your key at orcalayer.com/pricing.

Are there official client libraries?

Yes. There is an official Python SDK (pip install orcalayer, MIT-licensed, github.com/orcalayer/orcalayer-python), an MCP server for AI agents (uvx orcalayer-mcp), and an agent skill. For other languages the API is plain REST plus JSON, so any HTTP client works (Node.js fetch, Go net/http, cURL).

What happens if Polymarket changes their data model?

We adapt and ship updated endpoints under /api/v3/ when needed. Within v2, we promise no breaking changes โ€” only additive fields. Customers on Premium and Business get advance notice via email; everyone sees the changelog at orcalayer.com/docs/api.

Why am I getting 404 on an endpoint?

Check the exact path. Whale flips is /api/v2/whale-flips (not /whale/flips). The leaderboard is /api/leaderboard. Batch wallet lookups are POST /api/public/v1/wallets/overview and /wallets/positions (not /wallets/batch/overview). All data lives under /api/v2/* and /api/public/v1/* โ€” the only path under /api/v1/ is the health check (/api/v1/health). The authoritative path list is the OpenAPI spec at orcalayer.com/api/openapi.json.

Built with OrcaLayer

Our own research on OrcaLayer data, published with the data and code (CC BY 4.0). Use it as a worked example of an honest backtest: pick on one period, measure on the next, at a price you could really get.

Issue 3 ยท data + script

polymarket-football-late-goal-stop-loss-backtest

Live football on a recorded order book: buying late price jumps at a level score and stop-losses on goal bets, with event-level CSVs and a standard-library Python script that reproduces the summary.

GitHub โ†’ยทWrite-up โ†’

Issue 2 ยท data + script on the API

polymarket-copy-trading-whales-backtest

Walk-forward backtest of copying Polymarket whales picked on past results in MLB, NFL, college football, LoL and Valorant. Includes a standard-library Python script that reruns it on the OrcaLayer API (resolved markets by slug prefix, every trade of a market with the whale-trades cursor; Premium key).

GitHub โ†’ยทWrite-up โ†’

Issue 1 ยท data

polymarket-arbitrage-market-making-copy-trading-backtests

Cross-market arbitrage, in-play market making, copying wallets that buy before goals and the favorite-longshot bias, tested on real order book and on-chain data: why they lose money.

GitHub โ†’ยทWrite-up โ†’

Built something? Reach out at @orcalayer.

Coming next

  • More aggregation endpoints โ€” sector-level smart-money flow, multi-wallet correlation
  • WebSocket transport โ€” an alternative to the live SSE push feed (Premium)
  • TypeScript / JavaScript SDK โ€” a typed client for Node and browser apps (the Python SDK already ships: pip install orcalayer)

Subscribe to our Telegram channel @orcalayer for API changes and new endpoint announcements.

Start building today

Get your API key โ†’

60 seconds from sign-up to first API call. No credit card required for Free tier.