How settlement works
Every fill posts through a double-entry ledger. Buyer accounts are
pre-funded; a bid that would overdraw returns insufficient_balance
before dispatch. Seller proceeds credit the seller account at the fill price.
Settlement is idempotent on trade_id. Replaying a matching-engine event
does not double-book. Each journal entry balances; a background reconciliation
job re-reads the ledger and fails the process if credits and debits diverge.
Integrators see the economic result as a completed chat response (buyer) or a
row on GET /v1/sellers/{id}/trades (seller). There is no separate "settle"
API — matching emits the trade and the ledger consumes it.