prediction.neg_risk_arbitrage
Detect basket arbitrage in Polymarket neg-risk events by comparing the combined YES-basket price to $1, after accounting for fees, slippage, and minimum edge.
Instructions
Detect basket arbitrage in a Polymarket neg-risk (mutually-exclusive,
multi-outcome) event: a full YES basket across all outcomes always settles
to exactly $1 via Polymarket's neg-risk adapter, so a basket price away
from $1 (after costs) is a near risk-free edge. Also computes
buy/sell_basket_capacity_shares - the actual liquidity-bottleneck size the
thinnest outcome's order book can support within max_slippage_pct - so
this isn't just a top-of-book mirage. Polymarket only.
Use this to scan a specific multi-outcome event you already know the slug
for. Do NOT use for binary Yes/No markets (no basket to arbitrage, this
needs 2+ mutually-exclusive outcomes) or for Kalshi (its Data ToS forbids
this use of their data). Pair with prediction.exit_capacity_audit before
sizing a real position on one leg.
Args:
event_slug: Polymarket event slug, from the event's URL on polymarket.com.
assumed_round_trip_cost_pct: Gas + fees + slippage buffer, as a
percentage of $1 basket notional (default 1.5).
max_slippage_pct: How far past each leg's best price to walk the book
when sizing executable basket capacity (default 1.0).
min_net_edge_pct: Minimum net edge (%) required to flag
arbitrage_viable: true (default 1.0).
Returns:
On success: {"success": true, "basket_ask_sum", "basket_bid_sum",
"buy_basket_net_edge_usd", "buy_basket_capacity_shares",
"opportunity", "arbitrage_viable", ...}
On failure: {"success": false, "error": {"type", "message"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_slug | Yes | ||
| max_slippage_pct | No | ||
| min_net_edge_pct | No | ||
| assumed_round_trip_cost_pct | No |