Polymarket Gamma API deep dive: /events and /markets endpoints, pagination, tag IDs (864 Tennis, 745 NBA, etc), filtering by 24h volume, rate limits, and Python and Node code samples.
NaHarley Young·12 dakika za kusoma·Imesasishwa: 2026-05-01
Polymarket Bot Tutorial · Chapter 7 of 32
Polymarket Gamma API deep dive: /events and /markets endpoints, pagination, tag IDs (864 Tennis, 745 NBA, etc), filtering by 24h volume, rate limits, and Python and Node code samples.
By Harley Young, lead writer at Polymarkets.co.il. Last reviewed: May 2026.
What this chapter covers
This is chapter 7 of our 32-part series on building a Polymarket trading bot. We cover the topic in depth across the sections below. Body content for each section is being written and rolled out chapter-by-chapter; FAQ answers and references are already complete and reflect production experience from running our own trader.
Gamma vs CLOB: when to use which
/events endpoint anatomy
/markets endpoint anatomy
Tags and tag IDs (verified list)
Filtering: active, closed, volume24hr ordering
Pagination and limits
Rate limits and caching
Code: fetch top 24h-volume markets
Gamma vs CLOB: when to use which
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
/events endpoint anatomy
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
/markets endpoint anatomy
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Tags and tag IDs (verified list)
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Filtering: active, closed, volume24hr ordering
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Pagination and limits
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Rate limits and caching
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Code: fetch top 24h-volume markets
This section is in active development. Want to be notified when it goes live? Contact us or watch the authors page.
Frequently asked questions
What is the Polymarket Gamma API?
Gamma is Polymarkets metadata and discovery API. It serves event/market lists, titles, descriptions, end dates, tags, and aggregate volume. It does NOT serve real-time order book data - that lives on the CLOB API. For most discovery and analytics use cases, you start with Gamma.
What is the difference between an event and a market on Polymarket?
An event groups one or more markets that share a question theme. A market is a specific Yes/No outcome with its own order book and token IDs. A "2026 NBA Champion" event contains 30 markets (one per team). For binary Yes/No events, the event has 1 underlying market.
How do I find Polymarket tag IDs?
Tags are exposed via the gamma /tags endpoint. Verified IDs we use in production: 864 Tennis, 745 NBA. Tag slugs in URLs (?tag_slug=tennis) and free-text query (?q=tennis) are unreliable - use numerical tag_id only. Check /tags before relying on a slug.
How do I sort Polymarket events by 24h volume?
/events?order=volume24hr&ascending=false - this is what powers most "trending markets" widgets. Combine with active=true&closed=false to filter out expired or paused markets. Limit defaults to 25; max is 500 per call.
Are there pagination limits on Gamma?
Yes. The /events and /markets endpoints accept limit (max 500 per call) and offset for pagination. Most libraries do not paginate automatically - if you need the full universe, loop with offset until you get a page with fewer than `limit` results.
Does Gamma support WebSocket?
No. Gamma is REST-only. For real-time updates (price changes, new markets, order book) use the CLOB WebSocket - covered in chapter 8 of this series.
Maswali
What is the Polymarket Gamma API?
Gamma is Polymarkets metadata and discovery API. It serves event/market lists, titles, descriptions, end dates, tags, and aggregate volume. It does NOT serve real-time order book data - that lives on the CLOB API. For most discovery and analytics use cases, you start with Gamma.
What is the difference between an event and a market on Polymarket?
An event groups one or more markets that share a question theme. A market is a specific Yes/No outcome with its own order book and token IDs. A "2026 NBA Champion" event contains 30 markets (one per team). For binary Yes/No events, the event has 1 underlying market.
How do I find Polymarket tag IDs?
Tags are exposed via the gamma /tags endpoint. Verified IDs we use in production: 864 Tennis, 745 NBA. Tag slugs in URLs (?tag_slug=tennis) and free-text query (?q=tennis) are unreliable - use numerical tag_id only. Check /tags before relying on a slug.
How do I sort Polymarket events by 24h volume?
/events?order=volume24hr&ascending=false - this is what powers most "trending markets" widgets. Combine with active=true&closed=false to filter out expired or paused markets. Limit defaults to 25; max is 500 per call.
Are there pagination limits on Gamma?
Yes. The /events and /markets endpoints accept limit (max 500 per call) and offset for pagination. Most libraries do not paginate automatically - if you need the full universe, loop with offset until you get a page with fewer than `limit` results.
Does Gamma support WebSocket?
No. Gamma is REST-only. For real-time updates (price changes, new markets, order book) use the CLOB WebSocket - covered in chapter 8 of this series.