Preflight Risk Gateway.
GET /v1/preflight/{venue}/{market_id} is the core action-aware Risk Gateway endpoint. It should be called before an agent constructs, routes or authorizes its own order workflow. It accepts action context and returns Risk Gateway v1.2 fields such as component scores and conservative safe operating limits.
Verdicts and decisions
READY
No known blocker in evaluated checks.
CAUTION
Risk Gateway warning state: not blocked, but evidence or policy deserves operator attention.
DO_NOT_ACT
At least one non-advisory blocker fired. Do not proceed.
INSUFFICIENT_EVIDENCE
Required evidence could not be verified. Fail-closed.
Action context
Optional query parameters: intent, side, notional_usd, notional_eur, max_slippage_bps, policy, and horizon.
The Risk Gateway v1.2 response includes risk_gateway_context, decision, risk_score, liquidity_confidence_score, liquidity_confidence_status, liquidity_confidence_basis, component_scores, blocking_reasons, warning_reasons, repair_hints, safe_operating_limits, freshness, and fail_closed, while retaining backward-compatible verdict fields for existing agents.
safe_operating_limits are conservative operational diagnostics derived from live CLOB/public orderbook evidence, not a Gamma-only flag. They are not trading advice, not position sizing, and not a guarantee of execution.
Low-latency stream
Use WEBSOCKET /v1/preflight/stream when an agent needs repeated Risk Gateway snapshots without opening a fresh HTTP request for every check. This is the paid monitoring path for latency-sensitive bots that still want a stop/go decision, component scores, risk factors, and safe operating limits before continuing.
Authentication is sent in the first JSON message as {"api_key":"...","venue":"polymarket","market_id":"..."}. Never put keys in the URL. The first message can also include intent, side, notional_usd, max_slippage_bps, policy, horizon, interval_seconds, and max_snapshots.
{
"api_key": "$DONOTACT_API_KEY",
"venue": "polymarket",
"market_id": "540817",
"side": "buy",
"notional_usd": 2500,
"max_slippage_bps": 75,
"interval_seconds": 2,
"max_snapshots": 30
}Use REST for one-off diagnostics and the WebSocket stream for active monitoring. The stream returns diagnostics only; execution remains entirely in the client system.
Reason classes
| R1_WALLET_BINDING | Signature type, proxy, EOA, Safe, deposit-wallet flow and protocol version changes. |
| R2_ALLOWANCE_BALANCE | Allowance, asset wrapper and balance readiness. |
| R3_TICK_PRECISION | Tick-size limits, price bounds and decimal precision. |
| R4_METADATA_READINESS | Market metadata, neg-risk and fee metadata readiness. |
| R5_MARKET_STATE | Active, closed, paused, settled or degraded market state. |
| R6_BOOK_STALENESS_LIQUIDITY | Book age, spread, depth and slippage estimate. |
| R7_VENUE_MODE | Venue mode and liveness where covered by the current contract. |
| R7_EXIT_LIQUIDITY | Risk Gateway exit-side liquidity constraints. |
| R8_RESOLUTION_AMBIGUITY | Cross-reference to resolution-risk and dispute history. |
| R9_INSUFFICIENT_EVIDENCE | Risk Gateway component evidence gaps. |
| R10_CLIENT_POLICY | Caller policy constraints. |
| R11_CROSS_VENUE_DIVERGENCE | Reserved for future cross-venue mismatch evidence. |
Agent contract
Call preflight before constructing or routing an order workflow. If the verdict or Risk Gateway decision is DO_NOT_ACT or INSUFFICIENT_EVIDENCE, do not proceed. Outputs are operational diagnostics, not financial advice.
For recurring product value, pair preflight with resolution-risk and watchlist alerts, and preserve the signed receipt returned with authenticated responses.