⚠ 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

PartialFillHandler

exec.partialfillhandler
Execution planned Spec started frozen

PartialFillHandler decides what to do with the unfilled remainder after a partial fill: hold and wait, cancel the remainder, or chase the market by su

What it does

PartialFillHandler decides what to do with the unfilled remainder after a partial fill: hold and wait, cancel the remainder, or chase the market by submitting a new order. It respects the strategy's declared partial-fill policy and current book state.

Pipeline placement

runs after: OrderLifecycleManager (PARTIAL event received) PartialFillHandler runs before: CancelReplaceOptimizer (if remainder requires a new order)

Applies to: Every PARTIAL fill event with a non-zero remainder

Why it matters

If this failsConsequence
Remainder left resting indefinitelyCapital locked in a GTC order that will never fill at the original price if the market has moved; position budget exhausted.
Remainder always cancelledAggressive cancel policy causes the strategy to underfill its intended position size, leading to execution shortfall.
Chase price too aggressiveChasing too many ticks above the original price to fill the remainder results in a worse blended fill price than if the order had been left resting.

Inputs

Polymarket inputs

InputSourceRequiredUse
CLOB V2 top-of-book snapshotclob_publicrequiredDetermine current best bid/ask to decide whether book is thin and whether chasing is viable.
Recent fill rate on marketws_marketoptionalEstimate time-to-fill for remainder if left resting.

Internal inputs

InputSourceRequiredUse
PARTIAL ExecutionReport from OrderLifecycleManagerexec.orderlifecyclemanagerrequiredGet remaining_usd, original price, market_id, and strategy partial-fill policy.
KillSwitch active flagrisk.kill_switchrequiredCancel remainder immediately if KillSwitch active; emit no new order.

Authority

What this bot is permitted to do

Reshape

State

Readiness

Spec started

Status

planned

Class

Execution Utility

Default mode

shadow_only

Developer owner

Polytraders core — Execution pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
HOLD_REMAINDERINFORemainder left resting on book per hold policy.No action; emit ExecutionReport.
PARTIAL_FILL_DUST_AUTO_CANCELHARD_REJECTRemainder below min_remainder_size; auto-cancelled.Cancel order; forward to DustAndRoundingCleaner.
PARTIAL_FILL_BOOK_THIN_CANCELWARNBook depth < remaining_usd and cancel_on_book_thin=true.Cancel remainder.
PARTIAL_FILL_CHASE_ABORTEDWARNChase ticks exceeded chase_max_ticks; remainder cancelled instead.Cancel remainder; do not chase.
KILL_SWITCH_ACTIVEHARD_REJECTKillSwitch active; remainder cancelled immediately.Cancel remainder; halt.

Used by

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

StrategyStateActivity
BTC weekly — close-aware quotesdemo-wiredlast triggered 27m ago
Fed Rates — surprise driftfrozenlast triggered 34m ago

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

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…