Skip to content

Ledger and settlement

Trading Core holds the authoritative record of balances, orders and trades. The ledger is double-entry, carries multiple assets and networks, and cannot be edited.

Order to ledger to settlementThe customer asks for a quote; the server checks price freshness and the ceiling and issues it; the customer confirms and the trade books against the unused quote. The ledger posts a balanced journal, opens a hedge ticket and sends the event through the outbox to the back-office system, which sends opening positions back with a hash. At day close the completeness file is confirmed on the same hash.ORDERLEDGERSETTLEMENTfresh price · ceilingcustomer confirmshedge openseventsigned feedday open · hashhash confirmedCustomerasks for a quoteServer quotereference · price · expiryvalid 15 s by defaultTrade bookedquote unused · unexpiredduplicate-safe request keyLedger journalbalances to zero per assetno short · append-onlyHedge ticketopens on the deskfills append-onlyEvent outboxsigned · retried in orderBack-office systemconfirmations · statements1 Core System or ownDay closecompleteness file · SHA-256pruned after matching hashLEGENDStepLedgerBack officeMain flowBack from back office
A server quote becomes a trade, the trade becomes a balanced journal, and every journal leaves as a signed event. The day opens and closes against the back office on a matching SHA-256 hash.
  • Accounts by owner (customer, company own book, external, custody), by asset and by network.
  • Every account has an available and a held balance.
  • Every journal balances to zero per asset. An unbalanced posting is rejected.
  • Posted entries can never be updated or deleted. A correction is a new entry that references the original.
  • A trade that would take a customer short is refused.
  • THB deposits are matched to customer accounts.
  • THB withdrawals go through a hold, a payment file for the bank, and a one-way completion step.
  • Full history per customer.
  • Deposits are always credited as held, then released by the compliance gate — see Compliance controls.
  • Withdrawals are placed on hold while the checks run. Completion is one-way: a finished withdrawal cannot be reopened.
  • The network and chain are recorded on every movement.

Trading Core runs trading and intraday settlement. KYC, account opening, end-of-day statements and record retention are handled by a back-office system: Qirin X’s 1 Core System or the client’s own.

  • Signed event feed. Every trade, reversal, deposit, withdrawal, transfer, hedge fill, liquidity-provider movement, sweep and new deposit address is sent as an event through an authenticated outbox with automatic retry.
  • Customer link. The back-office system binds customers, pushes limits and sends account restriction commands.
  • Day open. Opening positions arrive as brought-forward balances with a SHA-256 completeness hash. If the hash is missing or does not match, the day open is refused and nothing is written.
  • Day close. Daily completeness files. A day is pruned locally only after the back office confirms a matching hash.
  • Breaks, not rewrites. A figure difference raises a break for investigation. History is never rewritten to make numbers agree.
  1. The back-office system sends the opening positions for the day with a SHA-256 hash.
  2. Trading Core recomputes the hash from the positions received. A mismatch is refused, and the same day can be sent again.
  3. The positions land as brought-forward balances. Any figure difference against the ledger raises a break.
  4. During the day, every event goes out through the outbox in order.
  5. At close, a completeness file is produced. The local day is dropped only after the back office confirms the same hash.
  • Rejects an unbalanced journal.
  • Refuses any update or delete of a posted entry.
  • Refuses a trade that would take a customer short.
  • Refuses a day open whose hash is missing or does not match, and writes nothing.
  • Never prunes a day before the back office confirms the same hash.
  • Never reopens a completed withdrawal, fiat or digital asset.