Skip to main content
    Developer Guide

    Polymarket API Key Setup

    Everything you need to generate, store and use a Polymarket CLOB API key — a security-first walkthrough for developers building bots, analytics tools and automated forecasting pipelines.

    7 min read·Updated July 2026·by PolyMarketBot Research

    TL;DR

    Polymarket's public Gamma and Data endpoints work without any key. You only need CLOB API credentials — a key, secret and passphrase — to place or manage orders. The three values are derived from a wallet signature, kept server-side in environment variables, and are revocable independently of the wallet's private key.

    PolyMarketBot
    Skip the code — use the terminal

    PolyMarketBot is a read-only intelligence layer over Polymarket. No API key required, no orders placed — just live signals, verdicts and cross-venue spread.

    Open Terminal

    When You Actually Need an API Key

    • Reading markets, prices, order books, trades: no key needed — use Gamma / Data.
    • Placing, cancelling or managing orders: CLOB credentials required.
    • Fetching your own positions and P&L history: CLOB credentials required.
    • Building read-only dashboards or research tools: no key needed.

    Prerequisites

    • A Polygon-compatible wallet (MetaMask, Rabby, or a hardware wallet).
    • USDC on Polygon in the wallet you will use for trading.
    • Node.js 18+ or Python 3.10+ if you plan to call the CLOB SDK.
    • A secure secrets store — environment variables, a vault, or a hosted secrets manager.

    Step 1 — Generate Your CLOB Credentials

    Sign in to the Polymarket app with your wallet, open the CLOB developer settings, and derive a key from your wallet signature. The response contains three fields:

    • apiKey — public identifier for this credential.
    • apiSecret — HMAC secret used to sign every authenticated request.
    • apiPassphrase — additional secret sent in the request headers.

    All three are required together. Losing any one requires revoking and re-deriving. They are scoped to the CLOB — they cannot move funds out of your wallet.

    Step 2 — Store the Credentials Safely

    Put the three values in server-side environment variables, never in a browser bundle or a public repository. A typical .env looks like:

    POLYMARKET_API_KEY=pk_live_...
    POLYMARKET_API_SECRET=...
    POLYMARKET_API_PASSPHRASE=...
    POLYMARKET_WALLET_ADDRESS=0x...
    • Use a hosted secret store in production — never commit .env.
    • Restrict the deploy target's IP if your host supports it.
    • Rotate the key after any suspected leak — rotation does not affect your wallet.

    Step 3 — Sign an Authenticated Request

    Every authenticated CLOB call carries HMAC-signed headers derived from the secret + passphrase + method + path + timestamp. Use Polymarket's official SDK — signing manually is error-prone and every drift is a 401.

    import { ClobClient } from "@polymarket/clob-client";
    
    const client = new ClobClient(
      "https://clob.polymarket.com",
      137, // Polygon chain id
      signer, // ethers.js wallet
      {
        key: process.env.POLYMARKET_API_KEY!,
        secret: process.env.POLYMARKET_API_SECRET!,
        passphrase: process.env.POLYMARKET_API_PASSPHRASE!,
      },
    );
    
    const positions = await client.getPositions();

    Step 4 — Respect Rate Limits

    • Public Gamma endpoints: a few requests per second per IP — cache heavily.
    • Authenticated CLOB endpoints: higher, still bounded — batch where possible.
    • For order-book updates, use websockets instead of polling.
    • Backoff on 429 with exponential retry; log every non-2xx response.

    Security Best Practices

    • Never expose the secret or passphrase in the browser. Proxy every authenticated call through your backend.
    • Separate hot and cold wallets. The wallet holding your API-active balance should hold only what you can afford to trade with.
    • Log every order request. A signed audit trail makes incident response tractable.
    • Set a hard order-size ceiling in code — belt-and-braces against a compromised key.
    • Rotate credentials after any suspicious event and revoke unused keys.

    Pair It with a Research Workflow

    A key by itself doesn't produce edge. Most serious operators split the stack: read-only intelligence upstream to find signal, and their own signed CLOB client downstream to act on it. That's exactly how PolyMarketBot fits — as the research and verdict layer that never touches your key.

    PolyMarketBot
    See where the edge is right now

    Compare Polymarket vs Kalshi vs PredictPlus with live spread, AI verdict and cross-venue arbitrage — updated every 30 seconds.

    Open Compare

    Polymarket API Key FAQ

    Do I need an API key to read Polymarket data?+
    No. Polymarket's public Gamma and Data endpoints are readable without a key. You only need API credentials (key + secret + passphrase) to place or manage orders through the CLOB.
    How do I generate a Polymarket API key?+
    Sign in with your Polygon wallet at the Polymarket app, open the CLOB developer settings, and derive a key/secret/passphrase from your wallet signature. Store the three values as environment variables — never in the frontend.
    Is a Polymarket API key the same as a private key?+
    No. The API credentials are scoped to the CLOB and can be revoked. Your wallet's private key controls the funds and must never leave a hardware wallet or secure signer.
    What are the Polymarket API rate limits?+
    Public Gamma endpoints allow a few requests per second per IP. Authenticated CLOB endpoints are higher but still bounded — cache aggressively and use websockets for order-book updates.
    Do I need an API key to use PolyMarketBot?+
    No. PolyMarketBot is a read-only intelligence terminal — it does not place orders and does not require your API key. Bring a key only if you want to wire your own automated tooling.

    Continue Learning

    New to event markets? What Are Prediction Markets. Deciding where to trade? Polymarket vs Kalshi. Or open the PolyMarketBot terminal.

    PolyMarketBotPolyMarketBot

    Explore market probabilities, spot changes, and understand AI assessments....

    Company
    Resources
    PolyMarketBot
    Payment network active

    Pay with confidence

    PolyMarketBot · Encrypted checkout through verified providers.

    Verified flow

    No card details stored by PolyMarketBot

    Crypto
    5
    Cards
    0

    Card availability is not confirmed. The provider may currently offer crypto only.

    Secure Payment
    Fast Activation
    Global Coverage
    Digital Receipt

    Payment availability varies by country. Access activates after provider confirmation.

    © 2026 Polymarket Bot. All rights reserved. This platform provides market intelligence, not financial advice.

    Not affiliated with Polymarket
    © 2026 PolyMarketBot · Read-only market intelligence. Not advice.Legal Codex & Privacy
    Verified by PolyMarketBot Live intelligence

    Timestamped intelligence · Tamper-evident record · Read-only analysis

    Integrity seal active
    PolyMarketBot
    Live Wins
    Awaiting next verdict resolution…