⚠ 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

SmartRouter

exec.smartrouter
Execution live General live demo-wired reference impl

SmartRouter translates an approved strategy intent into a concrete executable order by selecting the appropriate order type (FOK, GTC, or GTD), price,

What it does

SmartRouter translates an approved strategy intent into a concrete executable order by selecting the appropriate order type (FOK, GTC, or GTD), price, and timing. It may split a large order into iceberg child orders to reduce market impact. SmartRouter cannot change the direction of the trade, the target market, or the strategy intent — it is not permitted to flip the side (buy/sell), alter the outcome leg, or override any constraint set by the Risk guardrail pipeline. The only transformations it may make are to price, size scheduling, order type, and submission timing.

Pipeline placement

runs after: Risk guardrail pipeline (all RiskVotes collected) SmartRouter runs before: Order signing and submission

Applies to: Every approved OrderIntent that has passed the full Risk guardrail pipeline

Why it matters

If this failsConsequence
Wrong order type appliedA Fill-or-Kill order on a thin book will be rejected by the exchange and the strategy misses the opportunity entirely; a GTC order on a fast-moving market may fill at an outdated price.
Worked example
Setup: Strategy emits an OrderIntent for 6,000 pUSD on YES at ≤ 0.55 with TIF=GTC. Top of book is 0.54 with 2,200 pUSD depth, second level is 0.56 with 9,000 pUSD.
Without bot: A naive router sends the full 6,000 as a market order. It clears the 0.54 ask, walks to 0.56, fills the remaining 3,800 there, and ends up at a 0.553 average — a 30 bps slippage the strategy never modelled.
With bot: SmartRouter sees the depth profile, splits into 2,200 at 0.54 IOC + 3,800 as a passive 0.55 GTC, and only crosses the second level if the 0.55 leg ages out. The fill respects the price cap and the strategy's expected edge survives execution.
Large order submitted without iceberg splittingA single large visible order signals intent to other market participants and may be front-run or cause the book to refresh at a worse price before the order fills.
Order submitted after signal TTL expiresExecuting a GTC or GTD order on a signal that has aged past its validity window means acting on market intelligence that may no longer be accurate.
Tick size not respectedAn order with a price that does not align to the market's tick size will be rejected by the CLOB, resulting in a failed submission.

Inputs

Polymarket inputs

InputSourceRequiredUse
CLOB order book — top 50 levelsCLOBrequiredAssess current book depth to decide between FOK and GTC, and to determine whether iceberg splitting is warranted.
Market tick size and neg-risk flagGamma APIrequiredRound order price to the correct tick size; apply neg-risk routing rules when the neg-risk flag is set.
Recent fill rate and estimated queue positionData APIoptionalEstimate time-to-fill for GTC orders and decide whether to use a more aggressive price to improve queue position.

Internal inputs

InputSourceRequiredUse
Approved OrderIntent with all Risk constraints appliedPortfolioGuardrequiredReceive the final approved size, maximum price, and any constraint flags (passive_only, close_only) from the guardrail pipeline.
KillSwitch active flagKillSwitchrequiredAbort order construction and emit no ExecutionPlan if KillSwitch is active.

Authority

What this bot is permitted to do

Reshape

State

Readiness

General live

Status

live

Class

Execution Utility

Default mode

general_live

Developer owner

Polytraders core — Execution pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
STALE_MARKET_DATAHARD_REJECTMarket metadata (tick size) is unavailable, or GTD signal has aged past gtd_signal_ttl_s.Discard order; emit no ExecutionPlan.
SPREAD_TOO_WIDEWARNTick-size rounding shifted price by more than one tick.Attach warning annotation to ExecutionPlan; do not block.
KILL_SWITCH_ACTIVEHARD_REJECTGlobal kill switch is active; no orders may proceed.Discard order; emit no ExecutionPlan.
PARAMETER_CHANGE_REQUIRES_APPROVALHARD_REJECTiceberg_child_count or gtd_signal_ttl_s exceeds the locked hard maximum.Reject config change; do not apply.
NEGRISK_CONVERT_AVAILABLEEXPLAINNegRisk convert-arb route is available for this market; notifies Strategy layer.Emit NegRiskConvertRoute instead of a CLOB order when negrisk_convert_requested=true.
SMART_ROUTER_FOK_DOWNGRADERESHAPEBook depth was insufficient to guarantee a complete FOK fill; order was changed to GTC.Set order_type=GTC in the ExecutionPlan.
SMART_ROUTER_ICEBERG_SPLITRESHAPEOrder size exceeded iceberg_threshold_usd; split into child orders.Set iceberg=true and populate children array.
FEE_RATE_CAPPEDWARNComputed taker fee would exceed 100 bps or maker fee would exceed 50 bps. Fees are operator-set at match time; this warn is for logging only.Log the fee estimate; do not block the order.

Used by

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

StrategyStateActivity
NBA H2H — moneyline market-makedemo-wiredlast triggered 3m ago

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

⚙ Configuration — exec.smartrouter

Reject route if expected slippage exceeds this cap.

40% fill-priority

0 = minimise latency; 100 = maximise fill rate regardless of latency.

Configuration applies on next bot restart

Why this matters

Execution bots does NOT propose new positions; only routes and shapes approved intents. 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…