---
url: "https://polytoolhub.com/guides/polymarket-api-endpoints/"
publisher: "Polytoolhub"
dateModified: "2026-10-27"
---

[← Polymarket Tool Guides](<https://polytoolhub.com/guides/>) 

# Polymarket API Endpoints: Gamma, CLOB and Data

By Polytoolhub

Three hosts answer different questions. Gamma at https://gamma-api.polymarket.com discovers events and markets; CLOB at https://clob.polymarket.com serves public outcome-token books and separately authenticated order actions; Data API v2 at https://data-api.polymarket.com/v2 serves public positions, activity and rankings. These are provider-documented paths, not endpoints operated by Polytoolhub.

## Choose by task and access boundary

For market discovery use public Gamma GET /markets/keyset?closed=false&limit=1. For a CTF outcome book use public CLOB GET /book?token\_id={outcome token ID}. For a public trader ranking use Data GET /v2/leaderboard?time\_period=day&limit=1. Wallet positions and activity are separate Data reads; CLOB account-order management requires authentication. No account credentials are needed for the three public requests described here.

## Keep identifiers in their own columns

An event groups markets. Gamma id identifies the market metadata record; conditionId identifies the on-chain condition. In the sampled CTF market, outcomes and clobTokenIds were JSON-encoded arrays aligned by index. Parsing both linked the Yes label to its token. The returned CLOB book.market matched Gamma conditionId and book.asset\_id matched that token. Keep these values separate from the numeric Gamma id; check the protocol version and available fields instead of assuming every market uses this CTF mapping.

## A public market-to-book check

Polytoolhub requested one open market from https://gamma-api.polymarket.com/markets/keyset?closed=false&limit=1, then requested its selected outcome token from https://clob.polymarket.com/book. Both returned HTTP 200 without authentication. Gamma returned a markets array plus next\_cursor; CLOB returned matching identifiers, bids, asks and a timestamp. This demonstrates one public CTF handoff, not authenticated trading or ongoing availability. Repeating it can return a different market, an empty result or an unavailable book; do not keep the sampled price as a current quote.

## Trader ranking is not builder attribution

Data GET /v2/leaderboard?time\_period=day&limit=1 returned HTTP 200 with one user\_id ranking row and a data/pagination envelope, including has\_more and next\_cursor. This was only the first page. The separately documented /v2/builders/leaderboard ranks integrations using builder\_code; it was not part of the live check. Preserve the selected metric, period and units rather than equating trader profit with builder-attributed volume.

## Before you start

-   Decide whether the task is market discovery, one outcome's book, a public wallet's holdings/activity or a trader-versus-builder ranking.
-   For books obtain a token ID from the same Gamma market and check its book status; keep that market's Gamma id and conditionId separate.
-   For wallet reads use a public proxy-wallet address you are entitled to examine; never submit addresses, wallet secrets, signatures or keys to Polytoolhub. The cited public reads do not require an account.

## Follow the steps

1.  ### Discover a market on Gamma
    
    **Input:** A market discovery task or a known Gamma market id; no wallet credentials.
    
    **Action:** Request Gamma GET /markets/keyset?closed=false&limit=1 and read the markets array. Check question, status and protocol-specific identifiers before choosing an outcome.
    
    **Expected result:** Observed: one market and a continuation cursor. Future responses may differ or be empty.
    
    [Polymarket Gamma API](<https://polytoolhub.com/tools/polymarket-gamma-api/>) 
    
    [Choose another tool from Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>) 
    
    #### Check the result
    
    -   Check the keyset object and markets array; do not treat it as a bare-array route.
    
    #### Limitations
    
    -   An empty result or market without an enabled book is not evidence of a current tradable market.
2.  ### Select an outcome identifier
    
    **Input:** One Gamma market object with id, conditionId, outcomes and clobTokenIds.
    
    **Action:** Parse the JSON-encoded outcome-label and token-id arrays; match by index. Retain Gamma market id and on-chain conditionId separately from the selected token ID.
    
    **Expected result:** A documented mapping: Gamma market id for lookup, conditionId for Data condition filters and one outcome token ID for a CLOB book; not interchangeable identifiers.
    
    [Polymarket Gamma API](<https://polytoolhub.com/tools/polymarket-gamma-api/>) 
    
    [Choose another tool from Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>) 
    
    #### Check the result
    
    -   Check array lengths and label/token pairing; stop if a selected outcome lacks its token.
    
    #### Limitations
    
    -   The checked mapping is for a CTF market. Stop if label/token arrays are missing, misaligned or unsuitable for the selected protocol.
3.  ### Distinguish a public book from private orders
    
    **Input:** The selected outcome token ID and a decision to read a book or the operator's own open orders.
    
    **Action:** Consult clob.polymarket.com public GET /book?token\_id={token ID} for bids/asks, market, asset\_id and timestamp; for private GET /data/orders read the official L2 HMAC request-signing requirements instead of sending a request.
    
    **Expected result:** Observed: a public book with matching market and asset\_id. Private account operations remain untested.
    
    [Polymarket CLOB API](<https://polytoolhub.com/tools/polymarket-clob-api/>) 
    
    [Choose another tool from Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>) 
    
    #### Check the result
    
    -   For a returned book, match asset\_id to the token and market to conditionId; reading a book never proves a signed order worked.
    
    #### Limitations
    
    -   A missing book can return an error. No credential was created or used; order submission needs an additional wallet signature and was not tested.
4.  ### Select a public Data API v2 read
    
    **Input:** A public proxy-wallet address for positions/activity, or a conditionId for market-scoped reads; no API key.
    
    **Action:** Consult data-api.polymarket.com GET /v2/positions?user={proxy wallet}&limit=1 for holdings or GET /v2/activity?user={proxy wallet} for actions. Use condition, not Gamma market id, for an on-chain market filter.
    
    **Expected result:** Documented expectation: a data array plus pagination.next\_cursor for paged routes; position rows include condition\_id and token\_id, and an empty array is possible. No wallet data was queried.
    
    [Polymarket Data API](<https://polytoolhub.com/tools/polymarket-data-api/>) 
    
    [Choose another tool from Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>) 
    
    #### Check the result
    
    -   Compare condition\_id to Gamma conditionId and token\_id to the selected outcome, and follow next\_cursor until null.
    
    #### Limitations
    
    -   Public address data is not private order state or an attributed human identity. Positions default to OPEN, not all closed holdings.
5.  ### Separate trader and builder boards
    
    **Input:** A ranking question, time window and entity type (trader wallet or builder integration).
    
    **Action:** Compare Data GET /v2/leaderboard?time\_period=day&limit=1 (trader PNL or VOLUME) with GET /v2/builders/leaderboard?time\_period=day&limit=1 (builder-attributed volume and active users).
    
    **Expected result:** Observed on the trader route: one data row, has\_more and next\_cursor. The builder route remains documentation-only.
    
    [Polymarket Data API](<https://polytoolhub.com/tools/polymarket-data-api/>) 
    
    [Choose another tool from Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>) 
    
    #### Check the result
    
    -   Label wallet versus builder\_code, requested window and PNL versus VOLUME, and use next\_cursor rather than a page number.
    
    #### Limitations
    
    -   Daily marked PnL and all-time realized PnL differ; volume is in shares, not USD or guaranteed profit. Rankings do not identify people or establish integrations.

## Check the result

-   Name the exact host and path for your task and distinguish documented public GET from private credentialed CLOB actions.
-   Keep Gamma id, conditionId and a labeled outcome token ID distinct; compare CLOB book market to conditionId and asset\_id to that token ID.
-   For paged Data v2 reads expect data plus pagination and follow next\_cursor until null, but do not report these documented shapes as locally observed.
-   For rankings state whether the row is a trader user\_id or a builder\_code and name its window and metric.

## Limitations

-   The live check covered one Gamma keyset page, its selected CTF book and one Data trader-ranking page. It did not test wallet accounting, all pages, private requests, signatures, orders or service latency.
-   Market identifiers, books and rankings change. A successful response is a point-in-time observation, not a guarantee of complete history or future availability.
-   Public Data API wallet activity is not private CLOB order state; CLOB order management has a separate authentication boundary, and order placement also requires a wallet signature.
-   Paged Data v2 reads use opaque cursors; pagination.offset is display metadata, not a request parameter. Check filters, defaults, limits and empty results per endpoint.

## Continue with official documentation

-   [Polymarket REST hosts, public Gamma example and CLOB authentication](<https://docs.polymarket.com/getting-started/api>) 
-   [Gamma list markets parameters and array response](<https://docs.polymarket.com/api-reference/markets/list-markets>) 
-   [Market and condition IDs, indexed outcome tokens](<https://docs.polymarket.com/market-data/market-details>) 
-   [Public CLOB book token ID and response](<https://docs.polymarket.com/api-reference/market-data/get-order-book>) 
-   [Data v2 routes, public access, identifiers and cursor envelope](<https://docs.polymarket.com/api-reference/data-api/overview>) 
-   [Data v2 positions filters, status and response IDs](<https://docs.polymarket.com/api-reference/wallet/list-positions-for-a-user-or-market>) 
-   [Data v2 trader board window and user\_id](<https://docs.polymarket.com/api-reference/boards/get-the-trader-leaderboard>) 
-   [Data v2 builder board window and builder\_code](<https://docs.polymarket.com/api-reference/boards/get-the-builders-leaderboard>) 
-   [Keyset discovery response](<https://gamma-api.polymarket.com/markets/keyset?closed=false&limit=1>) 
-   [Identifier checks on a public book](<https://clob.polymarket.com/book>) 
-   [Trader leaderboard response envelope](<https://data-api.polymarket.com/v2/leaderboard?time_period=day&limit=1>) 

## Continue researching

-   [Polymarket Data API](<https://polytoolhub.com/tools/polymarket-data-api/>)  · next: Review response envelopes and public wallet or ranking use cases in the Data API profile.
-   [Polymarket CLOB API](<https://polytoolhub.com/tools/polymarket-clob-api/>)  · next: Review the stable CLOB profile for outcome-token books and the private signing boundary; no order was tested.
-   [Polymarket APIs and Data Providers](<https://polytoolhub.com/polymarket-api/>)  · context: Browse other published APIs by data coverage and delivery method.
-   [Polymarket Gamma API](<https://polytoolhub.com/tools/polymarket-gamma-api/>)  · next: Start discovery with Gamma before choosing an outcome token for a book.
-   [Polymarket API Authentication: Public Data and Trading Keys](<https://polytoolhub.com/guides/polymarket-api-key/>)  · context: Continue to the separate authentication boundary if your task needs private order operations.
