prediction.liquidity_depth_after_haircut
Calculate a Polymarket outcome's tradable depth within a set price-impact bound, before and after discounting top-of-book size to model cancellation risk.
Instructions
A single Polymarket outcome's executable depth within
max_price_impact_pct (default 5.0%) of the best quote, both before and
after discounting the top-of-book level's size by haircut_pct (default
10.0%) to model the risk that the very best resting order gets cancelled
before you can trade against it. Does not detect or flag actual spoofing
(out of scope - see architecture-roadmap.md Phase 3). Reuses the same
order-book fetch as prediction.exit_capacity_audit/order_split_guide -
no new upstream call.
Args:
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) or "buy".
haircut_pct: Percent to discount the top-of-book level's size by,
modeling cancellation risk. Defaults to 10.0.
max_price_impact_pct: Price-impact bound (percent of best quote)
within which depth is summed. Defaults to 5.0.
Returns:
On success: {"success": true, "best_quote",
"depth_shares_before_haircut", "depth_shares_after_haircut", ...}
On failure: {"success": false, "error": {"type", "message"}}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "prediction.liquidity_depth_after_haircut"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | sell | |
| outcome | No | yes | |
| token_id | No | ||
| haircut_pct | No | ||
| market_slug | No | ||
| max_price_impact_pct | No |