Skip to content

Gamma API

The Gamma API (https://gamma-api.polymarket.com) is Polymarket’s read-only metadata layer. It serves markets, events, search, tags, series, sports metadata, comments, and public profiles. No authentication required.

Polygolem wraps Gamma in two places:

  • internal/gamma — full typed HTTP client, used by every CLI command.
  • pkg/gamma — the public read-only surface that downstream Go consumers can import. Gamma response and query DTOs are exported from pkg/types.

The polygolem discover family is the CLI interface to Gamma:

Terminal window
polygolem discover search --query "btc 5m" --limit 10
polygolem discover markets --limit 20 --active
polygolem discover market --id 0xbd31dc8a...
polygolem discover market --slug will-btc-be-above
polygolem discover enrich --id 0xbd31dc8a... # joins Gamma + CLOB
polygolem discover tags --limit 100
polygolem discover series --limit 20
polygolem discover comments --entity-id 123 --entity-type market

Endpoint categories

CategoryEndpoints
MarketsList, by ID, by slug, by token ID
EventsList, by ID, by slug, keyset pagination
SearchCross-entity (markets, events, profiles, tags)
TagsList, by ID, by slug, related
SeriesList, by ID
SportsTeams, market types
CommentsList, by ID, by user
ProfilesPublic profile by wallet

REST Mapping

Polygolem methodREST pathAuthNotes
HealthCheckGET /PublicReachability check
Markets, ActiveMarketsGET /marketsPublicOffset pagination and filters such as active, closed, tag_id, slug, condition_ids, clob_token_ids
MarketByID, MarketBySlugGET /markets/{id-or-slug}PublicGamma accepts both ID and slug in the wrapped route
MarketByTokenGET /markets/token/{token_id}PublicGamma token lookup exposed through pkg/gamma and pkg/universal
MarketsKeysetGET /markets-keysetPublicKeyset pagination with keyset_id
EventsGET /eventsPublicOffset pagination and filters such as closed, tag_id, slug
EventByIDGET /events/{id}PublicOne event by Gamma ID
EventBySlugGET /events?slug=...&limit=1PublicPolygolem resolves slug through the list endpoint
EventsKeysetGET /events-keysetPublicKeyset pagination with keyset_id
Series, SeriesByIDGET /series, GET /series/{id}PublicMarket series metadata
SearchGET /public-searchPublicCross-entity public search
Tags, TagByID, TagBySlugGET /tags, GET /tags/{id-or-slug}PublicTag taxonomy
RelatedTagsByID, RelatedTagsBySlugGET /tags/{id-or-slug}/relatedPublicRelationship rows returned by Gamma
TeamsGET /teamsPublicSports teams with league/name filters
SportsMetadataGET /sports-metadataPublicSports metadata catalog
SportsMarketTypesGET /sports-market-typesPublicCurrent sports market-type catalog
Comments, CommentByID, CommentsByUserGET /comments, GET /comments/{id}PublicComment reads by entity or user
PublicProfileGET /profiles/{wallet}PublicPublic profile by wallet address

Current Gaps

GapCurrent state
Gamma write APIsNot wrapped; polygolem treats Gamma as read-only
Full sports game endpointsOnly teams, sports metadata, and sports market types are wrapped
Profile mutationNot wrapped

Upstream