aggKey is a deterministic key AGG computes for a market at discovery time, from that venue’s own
native data. Where a market is canonicalizable, it gives you one equality token you can use to fetch
every venue’s row for the same contract in a single call.
It appears on both objects: VenueEvent.aggKey (the event, e.g. a game) and VenueMarket.aggKey
(a market within it, e.g. a spread line).
Using it
ReadaggKey off any market or event, then fetch every venue’s row for it. Pass your app id with
the x-app-id header, as with every other discovery call. The param accepts one key or several, and
combines with the other filters (venue, status, …):
Use the event key for every venue’s version of the same event, the market key for the exact same
contract including line, period and window. Your app’s venue and category visibility still applies.
What it converges
The key is computed from each venue’s own data, so how far it converges depends on the family. It is guaranteed identical across venues where every venue exposes the same normalizable inputs: sports head-to-head (canonical league and team codes plus the game date), crypto up/down, and central-bank rate decisions (institution code plus meeting day). Two rows from different venues sharing a non-null key in those families are the same contract — same line, same period, same window. Dated outcomes — elections, “by when” questions, token launches — are derived from whatever the venue publishes: a human-readable slug where there is one, a ticker where there is not, and a date segment from that venue’s own resolution timestamp. Two venues listing the same question routinely produce different keys, so use the matched cluster for that family.
A key carried by only one venue is usually not a convergence failure — most of the time only one
venue lists that game or window. The guarantee is conditional: if two venues list the same contract,
their keys agree.
When it’s null
null means “no canonical key”. It is not an error and does not mean the market is unmatched —
those rows still carry their counterparts on matchedVenueMarkets[].
A market is keyed only when the key fully identifies the contract; see
Sports market suffixes for exactly which do. Player props, individual
strikes of a multi-strike ladder, and long-tail venue-specific propositions return null even when
their parent event has a key. Expect null far more often on markets than on events, and design for
it rather than treating it as a gap.
Do you need to parse it?
Almost never. Every fact you might read out of the string is already a typed field, and those fields are the supported contract — the segment grammar is not.
Building a sports detail page takes exactly one parse: the ladder
family key in Grouping a line ladder. If you are reaching into the key
for anything else, the field you want already exists.
Format
A key is theagg_ prefix followed by _-joined segments. Dates are YYMMDD (sports local date;
daily markets) or a compact UTC instant (sub-daily intraday markets). Decimals use p (2p5 = 2.5).
A future format revision will use a new prefix (e.g. aggk2_), so agg_ is your version guard.
Sports market suffixes
The market key is the event key plus a suffix. A full-game two-way moneyline carries no suffix — its market key is the event key. This is the complete set.{method} is a closed set: kotko, sub, dec, draw.
Full-game and full-match scopes carry no period token. Every other scope is the period value with
non-alphanumeric characters removed (set_1 → set1, first_5_innings → first5innings), trailing
for spread/total/BTTS and prefixed for moneyline.
Marker tokens are not unique
A team code can be spelled exactly like a suffix marker. Tottenham istot, Sporting is sp,
Malmö is ml, and all three are live:
Never split on the first
_sp_, _tot_ or _ml_. Splitting agg_atc_sp_wol_260906_sp_sp_m1p5 on
its first _sp_ yields agg_atc_sp — no opponent, no date — which collides with every other
Sporting fixture. Anchor on the _YYMMDD token: it ends every event key, and markers only ever
appear after it.
Grouping a line ladder
One card with a line selector, unioned across venues — the only supported structural read of the key. Uses theeventBase helper above, and gates on sportsMarketType: neither rule is safe applied to
the other type.
period field and put it in your group key alongside
the family. Order totals by lineValue. Order spreads by |lineValue|, taking the side of the axis
from the m/p token — polymarket stores spreads negative while kalshi, novig and predict store
them positive, so sorting on the signed value interleaves the two halves of one ladder.
Related
Matched Clusters
How AGG links the same event across venues, and which id to join on.
Sports Market Detail
Compose discovery, orderbook and chart endpoints into a cross-venue game page.
Comparing Venue Prices
Fetch matched events and their midpoints to build a cross-venue price comparison.