Skip to main content

Strategy Fills

A strategy fill is a real trade. It clears through the same pipeline as every other fill on Tradepost and is recorded as an Order Execution with the standard settlement lifecycle. This page covers how strategy demand becomes a fill, and how you observe it.

How strategy demand clears

Standing match. Incoming supply that satisfies a strategy's filter receives the strategy's bid automatically — the set-and-forget path.

Order-book crossing. When a seller sends a marketable order, strategy demand competes alongside the resting bids on the book. Price first, always; at equal price, resting orders fill before strategy demand.

A strategy fills against a sell only when every one of these holds:

GateRule
Self-tradeYour strategies never fill your own sells
Price floorA limit sell's floor binds strategies exactly as it binds resting bids
Market eligibilityThe fill clears only in a market both the seller and the strategy are eligible for — see marketScope in Types
Active strategyOnly active strategies participate
CapacityBudget and unit caps must have headroom at the moment of the cross — never past a cap, even across concurrent sells

Price at the cross

A strategy's price is a formula over fair value, not a stored number. At fill time it is recomputed against current fair value, and the execution records the fresh price. If fair value moved past the counterparty's slippage tolerance between quote and cross, the fill simply doesn't happen — neither side trades at a stale price. FLAT strategies have nothing to recompute — the bid is the bid.

The identity submission

Each active strategy owns one system-managed order submission — its identity — created at activation, cancelled at deactivation. Reactivating (including a group RESUME) mints a fresh one, so biddingStrategyIds returns cancelled historical identities alongside the live one — filter by status: RESTING for the current identity. Every execution the strategy produces records against its identity, which is what makes strategy fills first-class citizens of the executions API.

What you'll observe:

  • It appears in listOrderSubmissions carrying biddingStrategyId, and listOrderSubmissions(input: { biddingStrategyIds: [...] }) fetches it directly.
  • Its payment and delivery fields mirror the group's; its quantity is a ceiling, not a commitment — the strategy's caps govern actual fills.
  • It is read-only through the submission APIs: amend and cancel return SIGMAFILL_MANAGED, and bulk cancel skips it. The strategy lifecycle is the only control surface.

Observing fills

Query. Resolve the strategy's identity submission, then filter executions by it:

query {
listOrderSubmissions(input: { biddingStrategyIds: ["<strategy id>"] }) {
submissions { id biddingStrategyId status }
}
}
query {
listOrderExecutions(input: {
orderSubmissionId: "<identity submission id>"
}) {
orderExecutions { id price qty status createdAt }
pageInfo { endCursor hasNextPage }
}
}

Everything on Order Executions → Querying applies — same statuses, same pagination, same settlement semantics.

Real-time. Strategy fills push to your account's private fills channel account:fills#<account_id> like any other fill — see Order Executions → Real-time. No separate subscription.

Settlement. A strategy fill settles like any execution: PENDING → SETTLING → SETTLED, with FAILED and REVERSED as the exception paths. A failed settlement releases the capacity the fill consumed.

Budget accounting

The group and each strategy expose committed and in-flight consumption directly:

FieldMeaning
currentGroupSpendCents / currentStrategySpendCentsSpend committed by completed fills
pendingGroupSpendCents / pendingStrategySpendCentsSpend reserved by in-flight fills
currentUnitQuantity / pendingUnitQuantityUnits filled / units reserved
configFillCountsPer-product fill tally: { "<productId>": count }
configSpendCountsPer-product spend tally: { "<productId>": cents }

current + pending against the corresponding max* cap is the live headroom — when either side of any cap exhausts, the strategy stops filling and resumes if capacity frees (a reversal, a raised cap).