⚠ INTERNAL — Operator UX mock · Design preview of V2 development path · demo-wired ≠ production-live · back to dev guide
Polygon · pUSD 10
📓 Developer Guide 📋 Reason Codes 📈 Shadow Mode
JD John Doe · Admin

OrderFlowAnalyzer

intel.orderflowanalyzer
Intelligence live General live frozen

OrderFlowAnalyzer subscribes to ws_market for real-time trade prints and clob_public for order-book snapshots, then classifies each flow event as toxi

What it does

OrderFlowAnalyzer subscribes to ws_market for real-time trade prints and clob_public for order-book snapshots, then classifies each flow event as toxic (informed, likely to precede adverse price movement), benign (noise/retail), or informed (structural, correlated with neg-risk rebalancing). It emits an ObservationReport for every toxic flip and samples 1/10 routine ticks. Output feeds liquidity-aware strategies and the LiquidityGuard risk bot. OrderFlowAnalyzer is strictly read-only — it never submits or signs orders.

Pipeline placement

runs after: ws_market subscription established; clob_public book snapshot loaded OrderFlowAnalyzer runs before: liquidity-aware strategy layer, LiquidityGuard

Applies to: All markets with active ws_market subscriptions

Why it matters

If this failsConsequence
Toxic flow not detected before entryStrategy enters a market being targeted by informed traders; adverse selection erodes edge within seconds of fill.
Order-book imbalance not propagated to LiquidityGuardLiquidityGuard uses stale depth figures; permits entry at sizes that would incur >2× expected slippage.
Informed neg-risk flow misclassified as benignNeg-risk rebalancing activity (bulk outcome swaps) treated as noise; strategy takes wrong side of a structural price shift.
Microstructure features computed from stale snapshotStale imbalance and micro-volatility signals produce incorrect flow classification, causing either over-trading or missed entries.

Inputs

Polymarket inputs

InputSourceRequiredUse
Real-time trade prints (taker side, size, price, timestamp_ms)ws_marketrequiredClassify each fill as toxic / benign / informed based on size, speed, and direction patterns.
Order-book snapshots (top-50 bid/ask levels, sizes in pUSD)clob_publicrequiredCompute bid-ask imbalance, visible depth, and queue-position features for flow classification.
Market neg-risk flagGamma API (via internal cache)optionalAmplify informed-flow scoring for neg-risk markets where bulk outcome swaps are common.

Internal inputs

InputSourceRequiredUse
KillSwitch active flagKillSwitchrequiredContinue computing microstructure features but suppress ObservationReport emissions when KillSwitch is active.
LiquidityGuard depth thresholdsLiquidityGuard configoptionalCalibrate minimum imbalance threshold against current depth guard parameters.

Authority

What this bot is permitted to do

Read-only

State

Readiness

General live

Status

live

Class

Signal Service

Default mode

general_live

Developer owner

Polytraders core — Intelligence pod

Capital impact

Indirect

Reason codes emitted

CodeSeverityMeaningAction
ORDERFLOW_TOXIC_FLIPWARNFlow classified as TOXIC: large print or directional imbalance signals informed order flow.Emit ObservationReport with flow_class=TOXIC emit-every; downstream strategies apply adverse-selection guard.
ORDERFLOW_INFORMEDWARNNeg-risk market shows structural bulk-rebalancing flow classified as INFORMED.Emit ObservationReport with flow_class=INFORMED; strategies treat as structural directional signal.
ORDERFLOW_THIN_BOOKWARNVisible book depth below 2× LiquidityGuard minimum during flow classification.Include in warnings on ObservationReport; LiquidityGuard applies tighter size restrictions.
STALE_DATAWARNws_market disconnected or book snapshot stale for > 2× imbalance_window_s.Set flow_class=UNKNOWN for affected markets; halt emissions; downstream strategies do not enter.
KILL_SWITCH_ACTIVEHARD_REJECTKillSwitch active; ObservationReport emissions suppressed.Continue computing features but suppress all emissions.
MARKET_CLOSEDEXPLAINTrade print received for a market that is closed or resolved.Ignore print; unsubscribe from ws_market for this condition_id.
ORDERFLOW_RATE_CAPPEDINFOObservationReport emission rate-capped at publish_rate_hz for a benign market.Subsequent prints sampled; next scheduled emit will carry accumulated imbalance.
PARAMETER_CHANGE_REQUIRES_APPROVALHARD_REJECTA parameter change violates a locked bound (e.g. imbalance_window_s < 5).Reject config change; do not apply.

Used by

Reverse index — strategies that currently reference intel.orderflowanalyzer. If you change this bot's authority or reason codes, these strategies must re-pass shadow.

StrategyStateActivity
BTC weekly — close-aware quotesdemo-wiredlast triggered 18m ago
Fed Rates — surprise driftfrozenlast triggered 25m ago
AI Frontier — release-day takerfrozenlast triggered 32m ago

Showing 3 of 3 · demo-wired ≠ production-live

Why this matters

Intelligence bots does NOT propose, veto, sign, or execute any trade. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →
Polytraders Operator UX Mock · INTERNAL · demo-wired ≠ production-live · the plan · reason codes · shadow-mode pipeline
⚙ Page Configuration
Current page settings
Loading configuration…