Real-Time Arbitrage
AGG real-time arbitrage streams help prediction market apps find cross-venue price dislocations as they happen. UsearbReturn to rank matched markets, power trading dashboards, alert users, or feed
agent workflows with live arbitrage signals.
arbReturn is the estimated cross-venue arbitrage return for a matched market — a decimal fraction
(e.g. 0.012 = 1.2%) derived from the best prices across the venues in a matched cluster. The
List Venue Events API returns the initial arbReturn
value; the WebSocket API keeps it live.
Two consumption modes:
- Per-market — for a detail view of one or a few markets.
- Feed — a single coalesced subscription for a whole listing, so you don’t manage a subscription per visible row.
What you get
arbReturnon venue event and market listings for initial page loads and sorting.- Per-market WebSocket updates for focused detail views.
- A coalesced
arb-feedstream for large lists and dashboards. - SDK helpers (
subscribeArb,subscribeArbFeed) and React hooks (useMarketArb,useArbFeed). - Event-level rollups through
useArbFeed, wherebyEventkeeps the max livearbReturnacross markets in the same event.
The stream is delta-only and last-value-wins — there is no snapshot or sequence number. Load
the initial
arbReturn from the REST listing, then layer the stream on top. A market that hasn’t
moved since page load simply won’t appear in the stream yet, so always fall back to the listing
value. Updates are loss-tolerant. See the WebSocket Protocol
for the wire format and the API Reference for REST
request and response details.SDK (vanilla JS/TS)
React (hooks)
One market
A listing (feed)
useArbFeed maintains a live byMarket map and a derived byEvent map (the max arbReturn
across the markets of each venueEventId), so you can render either market-level or event-level
arbitrage live.
FAQ
What is prediction market arbitrage?
Prediction market arbitrage is a cross-venue price dislocation where matched markets imply a positive return if the relevant outcomes can be bought or hedged at the displayed prices. AGG calculates this signal on matched market clusters so apps can spot opportunities across venues without building their own matching and price-comparison layer.What does arbReturn mean?
arbReturn is the estimated arbitrage return expressed as a decimal fraction. For example,
0.012 means an estimated 1.2% cross-venue return for that matched market based on the best prices
AGG sees in the cluster. Use it as a ranking, alerting, or trading signal, and render it as a
percentage in user-facing views.
Is arbReturn guaranteed execution?
No. arbReturn is a real-time market signal, not a guaranteed fill or guaranteed profit. Execution
can still depend on venue availability, liquidity, routeability, fees, stale prices, slippage, and
order timing. Before placing trades, check the relevant market and outcome routeability fields and
use AGG’s routing and execution APIs for executable quotes.
Should I use REST or WebSocket data?
Use the venue-event listing to load the initial page, filters, and fallbackarbReturn values, then
use WebSocket data to keep visible markets live. The WebSocket stream is delta-only, so it does not
replace the listing response. For request schemas and parameters, use the
List Venue Events API reference; for live message
shapes, use the WebSocket Protocol.
Related
WebSocket Protocol
The arbitrage stream wire format — channels, subscribe frames, and message shapes.
List Venue Events API
REST schema for loading initial
arbReturn values, filters, pagination, and event rows.Comparing Venue Prices
Cross-venue price comparison the arbitrage return is derived from.
Real-Time Orderbook
Live aggregated orderbook subscriptions over the same socket.
Setup Guide
Client setup, provider wiring, and the full hooks reference.