CLOB Read (Public)
Get Market By Token
Polymarket-compat GET /markets-by-token/{token_id}.
Reverse-resolve a CLOB token id to its parent condition_id
- the canonical outcome label.
Resolves DB-first via the JSONB-indexed markets.clob_token_ids
column, then falls back to the Redis poller cache. The funded-key
audit on 2026-05-07 caught a divergence: /v1/midpoint?token_id=X
accepted token ids that the poller cache hadn’t seen yet, while
/v1/markets-by-token/{X} 404’d them. The DB lookup closes that
gap on every market the Gamma sync has hydrated (which is now all
of them, post-PR #887 backfill).
GET
Get Market By Token
Get Market By Token