userFills subscription or /info queries userFills and userFillsByTime. Reports identify individual orders with oid and individual trades with tid. A fill reduces that order’s remaining size; other orders are unchanged.
Amounts can have finer precision than the order-entry lot size because on-chain execution can partially consume a lot. Keep decimal amounts exact in accounting.
Order updates
Subscribe toorderUpdates for {order,status,statusTimestamp}. The nested order includes oid, coin, side, limitPx, sz, origSz, timestamp, and the optional cloid. Status is open, filled, canceled, or scheduledCancel. A partial fill leaves an open order with reduced sz.
A successful modify creates a new order ID. Late executions against an older published curve keep their original ID, even if it was canceled or modified. A canceled order can therefore receive a later fill and its remaining size can decrease. Cancellation acknowledges the gateway state change, not the end of all on-chain exposure.
At equal price, allocation between makers remains proportional to posted size. Within your own allocated leg, your orders at that price consume in order-ID order. See curves and allocation.
Persistence and reconciliation
Persist fills and deduplicate by(master, tid). No fill acknowledgement is required. On reconnect, fetch openOrders and fill history, subscribe again, and merge the overlapping data idempotently. userFills begins with a snapshot; replayed records keep their IDs.
The API retains the latest 2000 fills per master and up to 2000 eligible closed orders, while protecting identities needed by retained publications. Archive your own records. The platform’s public attribution API provides exact aggregate amounts and the on-chain fill decomposition for reconciliation.
Notification follows chain observation and durable attribution. Plan for seconds of delay; see settlement and fill latency.
Taker-specific fees are separate from maker fills: the platform attributes the full curve output to makers and credits the fee to the taker’s ledger row. Do not subtract the taker fee from these maker reports. See the public fee reconciliation API.