Reference / Trade execution

Fills and the order

A fill that Praxis can match to an order it is holding adds to that order's totals: the amount filled and the total value traded both grow by what the fill brought.

Contents

A fill naming an order Praxis holds neither as open nor as closed adds nothing at all, and the holdings are still changed by that same fill.

Reaching the end

An order that named an amount to trade is marked filled once the amount traded covers it, and partly filled until then.

An order that named a sum of money instead stays partly filled however much arrives. A separate report is what closes that one, written where the venue calls the order filled and something was filled.

A fill after the end

A fill can arrive for an order that has already closed. One way that happens is a late report for one order of a protective pair, but the only thing tested is whether the order is among the closed ones, so any closed order can take one.

The amount and the value are still added, so totals read later are right. The order keeps the status it closed at: it does not go back to partly filled, and it does not close a second time.

Source evidence
---
row: P2-31
baseline: 49aa659
created: 2026-09-25 19:37 UTC
modified: 2026-11-09 06:08 UTC
evidence:
  - claim: "The amount filled and the running value grow by what the fill brought"
    source: "`trading_state.py` 430-433"
  - claim: "A fill naming an order held neither way adds nothing to any order, the holdings still changing"
    source: "`trading_state.py` 426-428, holdings following at 403"
  - claim: "An order that named an amount is filled once that amount is reached"
    source: "`trading_state.py` 437-440"
  - claim: "An order that named no amount stays partly filled here"
    source: "`trading_state.py` 434-436, the standing set at 441"
  - claim: "A separate report closes that one, where the venue calls the order filled and something was filled"
    source: "`execution_manager.py` 4343-4354"
  - claim: "A fill for an order already closed is booked, and the status is left alone"
    source: "`trading_state.py` 417-424"
---

Edit this sourceCheckout revision · 7381aa49
Reference / keep your place
Find a passage