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 — the same trade cannot be booked
twice, so a retry or a duplicate event never charges you again. Every entry
balances, and the ledger is continuously reconciled against itself.
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.