How to Find a Polymarket Market ID, Token ID, Asset ID & Condition ID
Learn how to find Polymarket market IDs, token IDs, asset IDs, condition IDs, slugs, and clobTokenIds for API queries, price history, orderbooks, and market analysis.
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.
Related Polymarket API Workflows
- Polymarket Gamma API Events Slug — query an event by slug and extract market IDs, condition IDs, and clobTokenIds
- Use the Polymarket CLOB WebSocket market channel
- Polymarket Metadata Lookup — search events and markets by name, slug, or ID without writing API calls
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.
| Identifier | Used For | Example |
|---|---|---|
| Market ID | Metadata lookup | 558934 |
| Condition ID | Settlement logic | 0x7976b8dbacf9077eb1453a62bcefd6ab2df199acd28aad276ff0d920d6992892 |
| Token ID | Trading / price data | 4394372887385518214471608448209527405727552777602031099972143344338178308080 |
| Slug | Human readable lookup | will-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

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:

This returns:
- Market ID
- Event ID
- Slug
- Condition ID
- CLOB Token IDs
- metadata

This removes the entire dependency chain.
Polymarket API Example
Typical workflow:
- Find market slug
- Query markets endpoint
- Extract metadata
- Retrieve token IDs
- 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:

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.
Go from raw markets to charts and dashboards in seconds—no code, no CSVs.
Free to explore here · Polymarket, Kalshi, Chainlink & more
More reading
Polymarket Gamma API Events Slug: How to Query Events by Slug
Learn how to use the Polymarket Gamma API events slug endpoint, query an event by slug, inspect markets, and extract market IDs, condition IDs, clobTokenIds, outcomes, and slugs.
How to Track Polymarket Odds Over Time (Visualize Probability Changes)
Learn how to track Polymarket odds over time, visualize probability changes, and measure probability momentum using interactive charts. Build a live Polymarket odds tracker without coding.
How to Stream Live Polymarket Prices and Build Real-Time Charts (No-Code)
Learn how to stream real-time Polymarket market data using the WebSocket market channel and build live prediction market charts — no code required.
Kalshi Volume Explained: Quarterly Trends, Historical Growth, and Market Activity Data
Explore Kalshi trading volume over time with quarterly charts, growth trends, and data-driven insights. Learn what Kalshi volume means and what drives market activity.
Polymarket CLOB WebSocket Market Channel: Asset IDs, Prices & Trades
Learn how the Polymarket CLOB WebSocket market channel works, how to subscribe with asset IDs, and how to read real-time orderbook, price_change, last_trade_price, and market events.
How to Pull and Analyze Polymarket Event Data (No-Code)
Learn how to connect to Polymarket’s Events List endpoint, filter and analyze structured event data, and export datasets, from anywhere in the world — no code required.