The test looks at whether the fill bought or sold, and at the asset the commission was charged in. It never looks at the trading pair.
What that leaves out
Any pair whose coin is BTC gets the subtraction, whatever it is priced in.
A buy of some other coin, charged its commission in that coin, delivers its full amount while the wallet receives less — so the record sits above the wallet by the commission, and again on every buy after it. That is recorded in the register as U-04.
The money records cover one trading pair, and group purchases the same way: a buy charged in the money asset keeps its whole amount, a buy charged in BTC has the commission taken off.
Only the BTC case checks the size of the fee at all. A BTC commission that is not smaller than the amount the money records refuse outright, while holdings go on and take it. A money-asset commission of any size it books without complaint.
Why the order's total differs
The amount an order records as filled is the fill's own amount, commission and all.
Holdings say what is there to sell. An order says whether the amount asked for arrived, and by that reckoning the commission is a cost rather than a shortfall.
Related
Source evidence
---
row: P2-30
baseline: 49aa659
created: 2026-09-25 20:33 UTC
modified: 2026-10-11 19:29 UTC
evidence:
- claim: "A buy whose fee asset is BTC delivers the amount less the commission"
source: "`trading_state.py` 84-85 with the string at 66, subtracted at 459 and used at 483"
- claim: "Every other fill delivers its full amount"
source: "`trading_state.py` 84-87"
- claim: "The side and the fee asset are tested, never the symbol"
source: "`trading_state.py` 84"
- claim: "The money ledger books one symbol only"
source: "`account_ledger.py` 244-246"
- claim: "It splits the same way for its lots"
source: "either `account_ledger.py` 298-302 or 308-312"
- claim: "Only its BTC branch refuses a commission that is not smaller than the amount"
source: "`account_ledger.py` 303-306, the alternative branch at 298-302 carrying no such test"
- claim: "The order's own filled total stays gross"
source: "`trading_state.py` 430, which adds the fill's own amount"
---