How to Find Polymarket Market ID (CLOB, Token, Condition & Slug Explained)

Learn how to find Polymarket Market IDs, CLOB IDS, token IDs, condition IDs, and slugs. Step-by-step guide to extracting Polymarket metadata for API queries and historical analysis.

April 21, 20269 min readBy misterrpink
How to Find Polymarket Market ID (CLOB, Token, Condition & Slug Explained)

How to Find Polymarket Market ID (CLOB, Token, Condition & Slug Explained)

When I first started using the Polymarket API for research, I was completely stumped by how everything was structured. Even if you understand the difference between the Gamma API, Data API, and CLOB API, you still need to navigate:

  • Events vs Markets
  • Event IDs, Event Slugs, Event Tags
  • Market IDs, Market Slugs, Market Tokens
  • CLOB markets, orderbooks, trades, price history
  • Metadata needed for backtesting and analysis

Everything ultimately flows through Events and Markets. Whether you're building a bot, running quant-level backtests, tracking probability momentum, or just researching odds, extracting the correct ID becomes crucial.

The challenge is that the ID you actually need is rarely the one you start with.


What is a Polymarket Market ID

A Polymarket Market ID is the unique identifier for a specific binary market inside an event.

Each market has:

  • market id
  • slug
  • condition id
  • clob token ids
  • outcomes

The Market ID is typically required when making:

  • API requests
  • price history queries
  • orderbook calls
  • metadata lookups

However, you usually don’t start with the market ID. You start with:

  • a question
  • a URL
  • an event page

Which means you need to derive the market ID first.


Market ID vs Token ID vs Condition ID

Polymarket uses multiple identifiers, which is where confusion starts.

Market ID

  • identifies a specific market
  • used for metadata lookup
  • used for downstream deeper analysis into other markets endpoints

Token ID (CLOB Token ID)

  • sometimes referred to as "asset ID"
  • CLOB token IDs correspond to ERC1155 tokens representing YES/NO outcome shares.
  • identifies tradable outcomes
  • used for price / orderbook queries
  • separate token for YES and NO

Condition ID

  • links outcomes to settlement logic
  • derived from market structure

Slug

  • human readable identifier
  • used to find markets
  • normally can be found in Market URLs

Every binary market returns token IDs like:

["YES_TOKEN_ID", "NO_TOKEN_ID"]

These are the actual asset IDs used in price queries.

IdentifierUsed ForExample
Market IDMetadata lookup558934
Condition IDSettlement logic0x7976b8dbacf9077eb1453a62bcefd6ab2df199acd28aad276ff0d920d6992892
Token IDTrading / price data4394372887385518214471608448209527405727552777602031099972143344338178308080
SlugHuman readable lookupwill-spain-win-the-2026-fifa-world-cup-963

How to Find a Polymarket Market ID Manually

Let’s say you want to analyze:

Will the Virginia redistricting referendum pass?

You start with the URL:

https://polymarket.com/event/will-the-virginia-redistricting-referendum-pass

The slug is:

will-the-virginia-redistricting-referendum-pass

You can use Lychee to:

  • query metadata by slug
  • retrieve the market ID

Create to Polymarket API

Or via API:

import requests

# Example slug: copy from a Polymarket market URL
slug = "will-the-virginia-redistricting-referendum-pass"
url = f"https://gamma-api.polymarket.com/markets/slug/{slug}"

# Optional query param from docs: include_tag=true|false
response = requests.get(url, params={"include_tag": "true"}, timeout=20)
response.raise_for_status()

market = response.json()

print("market_id:", market.get("id"))
print("question:", market.get("question"))
print("condition_id:", market.get("conditionId"))
print("slug:", market.get("slug"))
print("clob_token_ids:", market.get("clobTokenIds"))
print("outcomes:", market.get("outcomes"))
print("outcome_prices:", market.get("outcomePrices"))

The response includes:

  • market id
  • condition id
  • clobTokenIds
  • outcomes

How to Get Token IDs or Asset IDs from a Market

Once you retrieve market metadata, you extract:

["YES_TOKEN_ID", "NO_TOKEN_ID"]

These represent:

  • YES outcome token eg: 61918066498633367803417153950894166474387166330773245675672479227566263123431
  • NO outcome token eg: 86819819312063810480442948275164497299497518243211784396459396519262712651330

These IDs are required for:

  • price history
  • trades
  • orderbook
  • liquidity

Without them, you cannot query probability over time.


Polymarket Metadata Explained

Market metadata typically includes:

  • market id
  • event id
  • slug
  • outcomes
  • prices
  • probabilities
  • timestamps
  • tags
  • condition id
  • neg_risk
  • min_order_size
  • clobTokenIds

This metadata is required to:

  • build dashboards
  • backtest strategies
  • analyze liquidity
  • plot probability movement

This metadata response is what powers all downstream Polymarket API queries. Everything flows from this metadata response.

  • see top holders
  • open interest
  • live volumes
  • check order book
  • get spreads
  • get trades
  • more

Use This Tool to Instantly Get Market IDs

Instead of manually:

  • extracting slugs
  • calling endpoints
  • parsing JSON

You can search polymarket-metadata using natural language:

Create to Polymarket API

This returns:

  • Market ID
  • Event ID
  • Slug
  • Condition ID
  • CLOB Token IDs
  • metadata

Create to Polymarket API

This removes the entire dependency chain.


Polymarket API Example

Typical workflow:

  1. Find market slug
  2. Query markets endpoint
  3. Extract metadata
  4. Retrieve token IDs
  5. Query price history

Example endpoints:

/markets
/events
/markets/{id}

These endpoints return JSON metadata including token IDs.


Common Mistakes When Working With Polymarket IDs

Common issues include:

  • confusing slug with market id
  • using token id as market id
  • missing condition id
  • querying wrong endpoint
  • guessing slugs manually
  • not handling multi-outcome events

Multi-outcome events like:

https://polymarket.com/event/2026-nba-champion

contain multiple markets, each with separate token IDs.

The only way to extract the CLOB Token ID effectively is to use lycheedata.com/polymarket-metadata

Otherwise:

  • hit the get Events by slug endpoint to get all markets in 2026-nba-champion
  • Then you need to parse the markets from the returned JSON
  • Extract the market slug
  • query markets by slug endpoint
  • parse the returned json to get the CLOB tokens
  • then finally call the price history endpoint using the correct asset id (CLOB id)

If you want to hit all countries in the NBA Championship probabilities, then you will need to do this for all countries i.e. all markets.

lycheedata.com/polymarket-metadata is easier:

Create to Polymarket API


FAQ

Where can I find my Polymarket token ID?

You must retrieve market metadata and extract clobTokenIds.

Does Polymarket have a data API?

Yes. Public endpoints provide market and event metadata.

Can you scrape Polymarket data?

Yes, via public API endpoints returning JSON metadata.

What is a Polymarket condition ID?

It links outcomes to settlement conditions.

How does Polymarket work technically?

Markets map to tokens, which trade on the CLOB and represent probabilities.


Final Thoughts

Working with Polymarket data means understanding the relationship between:

  • Events
  • Markets
  • Slugs
  • Market IDs
  • Condition IDs
  • CLOB token IDs

Once you can reliably extract these identifiers, you unlock:

  • historical probability tracking
  • orderbook analysis
  • strategy backtesting
  • automated trading workflows

The hardest part is simply finding the right ID — after that, everything else becomes much easier.

Related content

Need help?

Explore our docs or reach out to our team.