prediction.exit_capacity_audit
Audit a Polymarket outcome's live order book to determine executable share size, average fill price, and price impact vs the best quote. Validate real exit capacity before committing capital.
Instructions
Walk a single Polymarket outcome's live order book to determine how much
of a given position size can actually be filled right now, at what
average price, and with how much price impact versus the best quote - a
live, point-in-time snapshot, not historical/average liquidity.
Use this to validate one leg of an opportunity found by
prediction.neg_risk_arbitrage before committing capital, or whenever you
need real executable liquidity rather than the headline best bid/ask. Do
NOT use for multi-outcome basket arbitrage detection (use
prediction.neg_risk_arbitrage instead). market_slug only resolves an
EXACT Polymarket market slug - no fuzzy keyword search, since a wrong
silent match would be worse than an error here.
Args:
position_size_shares: Number of outcome shares to sell (or buy). Must
be positive.
token_id: The outcome's CLOB token_id / asset_id, if already known.
Provide either this OR market_slug.
market_slug: Exact Polymarket market slug, used to resolve token_id
automatically when not already known.
outcome: "yes" (default) or "no" - which side to resolve when using
market_slug. Ignored if token_id is given directly.
side: "sell" (default) to audit exiting a position against the bid
side, or "buy" to audit entering against the ask side.
Returns:
On success: {"success": true, "executable", "best_quote",
"avg_exit_price", "price_impact_pct", "max_executable_shares", ...}
On failure: {"success": false, "error": {"type", "message"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | sell | |
| outcome | No | yes | |
| token_id | No | ||
| market_slug | No | ||
| position_size_shares | Yes |