How to join 0Pools quotes, trades, balances, webhooks, request ids, and partner orders into a finance-safe ledger.
Reconciliation is the production backbone of a 0Pools integration. A user flow is not complete until your system can explain the movement from internal order to quote, trade, terminal status, and ledger entry.
Do this as a batch/reporting process as well as in real-time product code. Real-time code keeps users informed; reconciliation proves the records agree after events, retries, and terminal statuses settle.
Store enough to reconstruct the history. A single mutable status column without event and request references is not enough for production finance review.
select t.transact_id, t.quote_id, t.status, l.ledger_entry_idfrom pool_trades tleft join ledger_entries l on l.transact_id = t.transact_idwhere t.status in ('settled', 'returned', 'released') and l.ledger_entry_id is null;
This page is about joining quotes, trades, balances, webhooks, and partner ledger records. For developers, the durable boundary is simple: your product should depend on ids, statuses, event ids, amounts, timestamps, and ledger entries; it should not depend on internal settlement worker details and provider reconciliation files. That boundary is what lets 0Pools improve liquidity operations without forcing every partner to rebuild product code.
At daily close, finance joins partner orders to quote ids, trade ids, terminal events, and balance ledger entries. Anything unmatched becomes an exception with a clear next action.
A useful implementation stores these records before adding optional analytics. Analytics can be rebuilt from durable state; missing ids usually cannot be reconstructed after a customer-impacting failure.
This record is intentionally partner-facing. It references 0Pools objects and your own product ids, but it does not include private liquidity routes, treasury balances, raw provider payloads, or customer secrets.