Markets
Find the events, markets, and outcome tokens to trade. Lists, full event detail, and how to extract the condition_id and token_id every trading endpoint expects.
Every trading endpoint is keyed by IDs that come from this surface:
token_id— the outcome you want to buy or sell. Required by order placement, outcome-specific orderbook reads, and theorderbookandbest_quotestream channels.condition_id— the on-chain market the outcome belongs to. Used by Portfolio filters, condition-wide position operations, and thetradesandmarket_statusstream channels.
Both live on the same public endpoints documented here. No authentication required — the markets API is open.
Base URL: https://app.agara.xyz — every path
below is under /api/v1.
Endpoint summary
| What you want to do | Method | Path |
|---|---|---|
| Browse / search events | GET | /events |
| Read one event + its markets | GET | /events/{slug} |
| List markets (with outcomes inline) | GET | /markets?source=agara |
A single event groups one or more markets (e.g. "2025 Presidential
Election" with one binary market per candidate). Each market currently has
exactly two outcomes, including markets in a neg-risk group.
You trade against an outcome's token_id.
List events
GET /api/v1/events?source=AGARA
Paginated, keyset cursor. Defaults to live events first, then
upcoming events by start time, with finished and settled events last.
Keep source=AGARA on the first request and every paginated request.
Query parameters
| Param | Type | Notes |
|---|---|---|
limit | int | 1–100, default 20 |
cursor | string | Opaque cursor from a previous response's next_cursor |
category | string | Filter to a category slug (politics, sports, tennis, …) |
event_type_bucket | games | props | Narrow to sports games or prop markets |
filter | string | Named filter, e.g. sports_live |
source | string | Filter to AGARA with source=AGARA |
exclude_ended | true | false | Drop events that have already finished, and events with nothing left to trade. A repeating market is kept while its next round is still being set up, so check the market's state before you try to place an order |
resolution | all | active | proposed | disputed | resolved | Filter by settlement status. active = not yet in resolution |
sort | time | volume | markets | Secondary sort within each lifecycle group (live always leads); default is soonest-first |
include_markets | true | false | Add listing_markets with lean market/outcome data for prop and multi-outcome rows (off by default) |
filter=sports_live is the exception to the response below: it returns
leaf-category sections without pagination. Other filters return the flat,
paginated events shape.
Response
By default, events[] is a list view with display metadata rather than
order-ready IDs. Setting include_markets=true adds a lean listing_markets
subset with outcome token IDs for non-game events: the main market for a
proposition or the top candidate markets for a multi-outcome event. Fetch event
detail by slug when you need the event's complete market set and full fields.
primary_category is the event's main category as curated by the
operators, and is null when the event has none.
market_count is how many markets the event covers. It is left out for a
recurring series, which opens a fresh market every cycle and so has no
meaningful total to report. Treat the field as optional and fall back to the
markets you were sent rather than to zero.
Examples
Pagination
Pass the previous response's pagination.next_cursor back as
?cursor=. When it comes back null, you've reached the end.
Event detail
GET /api/v1/events/{slug}
The full event, its markets, and every outcome on each market —
including the condition_id per market and the token_id per
outcome. Recurring series (such as the 5-minute crypto markets)
return the live window plus the nearest upcoming and most recent
settled cycles, not the full cycle history.
Response (trimmed to trading-relevant fields)
Real responses carry more fields (category breadcrumbs, sport enrichment, market tabs, display bags); the table below is the subset that matters for trading.
Fields you'll use
| Path | Use it for |
|---|---|
markets[].condition_id | Positions filter, market_status channel |
markets[].outcomes[].token_id | Place order, Orderbook, streaming orderbook / best_quote channels |
markets[].is_accepting_orders | If false, orders on this market's tokens will be rejected with 400 |
markets[].tick_size_micro | Smallest price increment, in micro-probability — your price_micro must be a multiple of this |
markets[].min_order_size_micro | Catalogue metadata; use Order size limits for enforced AGARA bounds |
markets[].exchange | Exchange the market settles on; AGARA docs use AGARA |
outcomes[].best_bid_micro / best_ask_micro | Top-of-book quote — useful for picking a price without a separate orderbook call |
Errors
| Status | Reason |
|---|---|
404 | No event with that slug, or it's archived |
Examples
List AGARA-only markets
GET /api/v1/markets?source=agara
Dedicated discovery surface for AGARA-native markets — every
non-archived market where exchange == "AGARA", with its outcomes
(and token_ids) inline. One request hands you everything you need
to place an order. Unauthenticated, like the rest of the markets API.
Use this when you want the full AGARA catalogue with outcomes
inline in a single request. The general /events
endpoint is broader and lighter — use it for browsing and
pagination by event.
Query parameters
| Param | Type | Notes |
|---|---|---|
source | string | Required. Only agara (case-insensitive) is accepted today. |
limit | int | 1–256, default 64 |
cursor | string | Opaque cursor from a previous response's next_cursor |
event_slug | string | Narrow to markets on a single event |
state | string | Restrict to one lifecycle state, such as ACTIVE (case-insensitive) |
Response
Rows are sorted by is_accepting_orders (tradeable first), then
volume_micro (highest first), then id for cursor stability.
condition_id is populated once the market is deployed on-chain and remains
available after the market stops accepting orders. It is null before
deployment. Trade against the outcomes[].token_id directly.
Examples
Pagination
Same shape as /events — pass the previous response's
pagination.next_cursor back as ?cursor=. Reaching the end returns
next_cursor: null.
A cursor is tied to the filters of the request that produced it. If you reuse
it while changing source, event_slug, or state, the request fails with
400 — drop the cursor and start again
from the first page.
Picking the right outcome
All markets are currently binary — two outcomes labelled "Yes" and "No", or two team names. Complementary prices sum to one collateral unit, but a SELL requires you to hold that outcome token; choose the side and order direction that match your inventory and strategy.
A few patterns to know:
- Yes/No prop:
outcomes[].labelis literally"Yes"/"No". - Team moneyline:
outcomes[].labelis the team name. The helper fieldshort_label(e.g."LAL","BOS") is good for compact UIs. - Over/Under totals:
outcomes[].labelis"Over"/"Under"; the threshold lives on the parent market'slinefield. - Multi-outcome (elections, championships): one event holds many
binary markets, one per candidate. Each market has its own
condition_idand a Yes/No pair oftoken_ids. Pick the market for the candidate you want, then the YES outcome to bet on them winning. - Three-way moneyline: the web app may group Home / Draw / Away binary members into one card or grid. Each member retains separate YES and NO controls; there is no three-outcome CTF condition.
Neg-risk works the same way at the market level: it groups mutually exclusive binary markets, but every member keeps its own condition, two outcome tokens, and orderbook.
End-to-end: from slug to placed order
What's next
- Quickstart — discover, place, and watch an order end-to-end in one script.
- Orders — every order operation, with the
token_idyou just discovered. - Orderbook — live depth for a
token_id. - Streaming — subscribe to
orderbook/best_quotebytoken_id, andmarket_statusbycondition_id. - Catalogue API reference — every discovery endpoint, parameter, and status code.