Polymarket Gamma API wrappers — the public markets/events catalog
(gamma-api.polymarket.com).
This is the right surface for market discovery: every market and
event, with rich filters (active/closed, slug, series, tags, volume
ordering), including the high-frequency recurring series (e.g. the
5-minute "BTC Up or Down" markets) that the CLOB sampling-markets
endpoint — which only lists reward-bearing liquidity markets — does
not return.
Thin wrappers over PolymarketClob.HTTP with the host pointed at the
Gamma API. Responses are JSON arrays (events/markets) rather than the
CLOB's %{"data" => [...]} envelope.
Notable response fields
- an event has
slug,title,active,closed,markets(array),series(array, withrecurrencelike"5m"),tags; - a market has
question,conditionId,clobTokenIds(a JSON-encoded string array of the two token ids),outcomes(e.g.["Up","Down"]),active,closed.
Summary
Functions
Fetch a single event by slug (returns the matching event(s)).
List events. Common params: active: true, closed: false,
slug: "...", series_id: ..., tag: "...", limit:, offset:,
order: "volume24hr", ascending: false.
List markets. Same filter vocabulary as get_events/2 plus
clob_token_ids: / condition_ids: to fetch specific markets.
List series (recurring market groups). Params: active:, closed:, slug:.
Types
@type result() :: {:ok, term()} | {:error, PolymarketClob.Error.t()}
Functions
Fetch a single event by slug (returns the matching event(s)).
List events. Common params: active: true, closed: false,
slug: "...", series_id: ..., tag: "...", limit:, offset:,
order: "volume24hr", ascending: false.
List markets. Same filter vocabulary as get_events/2 plus
clob_token_ids: / condition_ids: to fetch specific markets.
List series (recurring market groups). Params: active:, closed:, slug:.