ResearchSkybitOpen app

How do I map Polymarket events and outcomes to tradable token IDs?

By Skybit Research · Published
Sources verified Nov 9, 2026.

For international Polymarket’s CLOB, start from the market you intend to trade, read its outcome tokens from the SDK’s outcome object or parse `clobTokenIds` (or `positionIds` on newer V2 markets), and use the token for the outcome you want as the CLOB `token_id`. Validate with `/book`, read per-market constraints, and log venue, market, outcome, token and retrieval time.

Start at Gamma, not at the label

Treat the event title as a search key, not an identifier. Gamma is the discovery surface: it returns events and markets and the metadata needed to work with them, while CLOB is where prices, books and orders live. Start from the market you intend to trade: Gamma’s `/markets` endpoint lists markets and their metadata, and the SDK’s `get_market` resolves a market URL to a market object. Never send an event ID to CLOB as if it were a token.

Keep one row per outcome and attach the venue, market ID, outcome label, token ID and retrieval timestamp. That row is your join key when prices, resolution rules or token IDs change. If a response gives you only a market-level identifier, resolve the outcome token before trading; do not infer it from the event title. This is especially important when a market has multiple outcomes or when the same event appears on international Polymarket and Polymarket US.

Sources: [1] [2]

Resolve the outcome token, not the array index

For binary event markets, the CLOB exposes two outcome tokens; the Orbit guide describes them as Yes and No, while up/down markets use Up/Down labels. Each CLOB call needs the token for the outcome you care about. Gamma market objects store token IDs in `clobTokenIds` as a JSON string, so parse it before use; newer V2 markets may list them under `positionIds`. Do not assume the raw string is a single ID, and do not infer token order from the question text alone.

Hypothetical example: the SDK returns `market.outcomes.yes.position_id` as `T-YES` and `market.outcomes.no.token_id` as `T-NO` for a binary event market. Use `T-YES` for a YES buy, then request `/book?token_id=T-YES`. If the SDK exposes no explicit outcome object, parse `clobTokenIds` but cross-check the outcome label in the market metadata or stop. The token is the tradable key; the label is not.

Sources: [2] [3]

Validate against CLOB before any order

A parsed token ID is necessary but not sufficient. Query the CLOB book for that `token_id` and read `tick_size`, `min_order_size` and `neg_risk` per market rather than hard-coding them; tick size can change while a market runs. If `/book` returns no market or omits constraints, treat the mapping as unverified. This prevents sending an order to a stale or wrong token after a market upgrade.

For streaming, subscribe to the CLOB market WebSocket with `assets_ids` containing the same token IDs; the subscription frame uses token IDs. A reconnect should trigger a REST reconciliation of open orders and a fresh book read before any new order. Keep the Gamma market identifier and token ID in the same record so a WebSocket message can be traced back to the outcome you intended.

Sources: [2] [1]

Log the mapping and fail closed

Token identity does not prove economic equivalence. Polymarket uses UMA for prediction markets and Chainlink TWAP for up-down markets, and resolution rules define the payout. A YES token on one market may not match a YES token on another event with a similar title. Log the resolution source and rules hash alongside the token mapping, and require human review when the mapping crosses markets or venues.

Scope the mapping to the correct product. Polymarket runs international and Polymarket US as separate platforms, and the international site also lists perpetual futures; do not reuse an international CLOB event token ID on Polymarket US or for a perp. If your system cannot prove venue, product type, market ID and outcome label, fail closed. The cheapest failure is a rejected mapping, not a filled position in the wrong token.

Sources: [3] [4]

Gamma-to-CLOB identifier mapping fixture
StageIdentifier or fieldDesk action
Market discoveryGamma `/markets` or SDK `get_market(url=...)`Keep event slug/URL for grouping; trade only the market’s outcome tokens
Market payload`clobTokenIds` JSON string or `positionIds`Parse to array; prefer SDK `market.outcomes` object when available
Outcome legOutcome token (Yes/No or Up/Down)Pass as CLOB `token_id`; never send event or market ID as token
Pre-trade checkCLOB `/book?token_id=...`Read `tick_size`, `min_order_size`, `neg_risk`; reject missing token
Scope guardInternational CLOB vs US/perpsDo not reuse a token ID across venue or product type

Assumptions and scope

  • Scope is international Polymarket CLOB binary event markets, not Polymarket US, Polymarket perps, or up/down markets except where noted.
  • Gamma field names can vary by market version; verify `clobTokenIds` or `positionIds` per response.
  • `T-YES` and `T-NO` are synthetic placeholders, not real Polymarket identifiers.
  • Outcome-to-token mapping must be confirmed from an explicit outcome object or market metadata; array position alone is not proof.

Sources and verification

  1. Polymarket API surfaces
    Source checked Nov 9, 2026.
  2. Polymarket API Explained: Gamma, CLOB, WebSocket and SDK | OrbitServers
    Source checked Nov 9, 2026.
  3. Polymarket resolution mechanisms
    Source checked Nov 9, 2026.
  4. Polymarket review: what it is, fees and safety (2026-11)
    Source checked Nov 9, 2026.

Prepared by Skybit Research with AI assistance and automated source checks. Examples and assumptions are identified in the article. No human reviewer is implied. Check the exact contract and current venue documentation before applying a method.