Reference / Trade execution

The expiry cancel

When an order is found past its deadline, Praxis settles on reporting it expired, asks the venue to cancel it, and reports. That report is settled first, so what the venue says next decides what is written against the order, and the reason the report carries.

Contents

What the venue's answer changes

A venue that reports no such order leaves the mark standing, and the expiry is then written against the order itself.

Any other venue failure carrying a reason clears the mark instead. Nothing is written against the order, and the failure is carried in the report's reason.

Either way the request is reported expired. So being told a request expired does not say whether the order at the venue was actually stopped.

When nothing is reported at all

A cancel reply that lacks a field, or carries an unfamiliar status, reaches neither of those endings. It ends the whole attempt before any report is built, leaving only a line in the log.

For a linked pair it is narrower: its status is supplied rather than read, so only a missing name for the pair does it.

A body that will not parse at all is different again — that counts as a venue failure, so the request is still reported expired.

The same reply on other cancels

The orders of work carried out as several orders are cancelled elsewhere, and there the same unreadable body is caught and skipped, leaving the run waiting on children. A failure reading a field there stops the account where the worker's drain or a winding-up asked for it. Asked for as an account is given up on, it carries out of the start. A cancellation from outside, or the repair pass, logs it and carries on.

Source evidence
---
row: P2-25
baseline: 49aa659
created: 2026-09-25 08:00 UTC
modified: 2026-10-11 19:23 UTC
evidence:
  - claim: "The report is settled as expired before the venue is asked anything, and a mark set with it"
    source: "`execution_manager.py` 4415-4417"
  - claim: "The expiry is written against the order only where that mark still stands"
    source: "`execution_manager.py` 4436-4444"
  - claim: "A linked pair is cancelled by its own call, any other order by the single-order one"
    source: "either `execution_manager.py` 4419-4424 or 4426-4430"
  - claim: "A venue with no such order leaves the mark standing, so the expiry is recorded"
    source: "`execution_manager.py` 4431-4432 leaving the flag set at 4417, appended at 4436-4444"
  - claim: "Any other venue failure carrying a reason clears it, so no expiry is recorded against the order"
    source: "`execution_manager.py` 4433-4435, skipping 4436-4444"
  - claim: "The request is reported expired on both of those"
    source: "`execution_manager.py` 4446-4448"
  - claim: "A cancel reply lacking a field, or carrying an unfamiliar status, reaches neither"
    source: "raised at `binance_adapter.py` 1690, 1691 or 897, escaping both arms at `execution_manager.py` 4431-4435, logged at 4012-4019"
  - claim: "For a linked pair a missing list id does that, or a reply no name can be looked up in, the status being supplied"
    source: "raised at `binance_adapter.py` 1735, supplied instead at 1736"
  - claim: "A body that will not parse is a venue error, so that one is reported"
    source: "wrapped at `binance_adapter.py` 660-662, or raised at 1143-1152, caught at `execution_manager.py` 4433-4435"
  - claim: "On a run's child cancel the same body is caught and skipped, leaving the run awaiting its children"
    source: "`execution_manager.py` 6461-6468, the run held open at 6355-6356"
  - claim: "A field failure there stops the account where the worker's drain or a wind-up asked"
    source: "reaching `execution_manager.py` 4025-4026 from either 3960 or 8382, logged instead at either 3944-3951 or 7303-7308"
  - claim: "Asked for instead while an account is being given up on, the same failure carries out of the start"
    source: "`execution_manager.py` 3657, reached from `praxis/trading.py` 623 and out through 525-528"
---

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