Skip to main content
The same prediction market often trades on more than one venue at the same time, at different prices. AGG’s matching pipeline links those markets together as matchedVenueMarkets so you can build a cross-venue price comparison in three calls:
  1. List matched events — events confirmed on two or more venues.
  2. Walk every market and its matched siblings — collect each venueMarketId.
  3. Batch-fetch midpoints — one getMidpoints call returns the live Yes-side price per market. The client batches 75 ids.
The midpoint is the live orderbook’s headline mark on a 0–1 scale, where 0.55 means the market implies a 55% probability of “Yes”. Comparing midpoints across venues for the same matched event surfaces the spread an arbitrageur, smart router, or “best price” badge cares about.

1. Create the client

2. List matched events

getVenueEvents accepts matchStatus as an array. Pass ["matched", "verified"] to restrict the response to events confirmed across more than one venue — every market in the response includes its matchedVenueMarkets. Calls GET /venue-events.

3. Collect every venueMarketId

Walk the response and gather every market ID — the event’s own markets plus each matchedVenueMarkets[].id.
The venueMarkets array on a list event is a preview of up to three markets. Page GET /venue-markets?venueEventId= for the full set. Sibling venues stay on matchedVenueMarkets[]. Which id to pass is Ids. Midpoints take venueMarketId.

4. Batch-fetch midpoints

The client sends at most 75 ids per request and merges the responses. Pass bestPrice=true to add bestBid, bestAsk, and arbReturn. Two Hyperliquid listings in one cluster are different books. See Hyperliquid deployers.
Get live midpoints for multiple markets.

Entries are never dropped — check error before trusting a price

Every requested id gets an entry back, even one the API can’t price. Unknown or resolved markets return midpoint: null alongside a structured error rather than being omitted, so the response array stays aligned with the ids you sent and a batched request can’t silently shift. GET /orderbooks behaves the same way.
Don’t treat data[0] as “the match” for a single-id lookup. Filter on venueMarketId, and check error — otherwise a typo’d id yields an entry with no price that reads like a real, cheap market.

5. Build the comparison

Index midpoints by venueMarketId, then for each market look up its own midpoint plus its siblings’.

Live updates

/midpoints is a snapshot. There is no midpoint WebSocket channel. Live depth is the orderbook socket, keyed by venueMarketOutcomeId. Snapshots and deltas on that socket include a midpoint for the outcome.

Building Market Views

Compose discovery and orderbook endpoints into event grids and trading views.

Real-Time Orderbook

Live depth for an outcome id.