Skip to main content

UAE postings — worked examples

Concrete debit/credit for each UAE txn_type. All amounts USD. (cust-x) = the customer_id scope on that line.

Wire in — USD $10,000 deposit at GTN

DR 1100 Omnibus Cash @ GTN         $10,000   (cust-x)
CR 2010 Customer Cash Wallet USD $10,000 (cust-x)

Wire in — AED 36,725 deposit at ZAG (USD-equiv $10,000 at peg)

DR 1115 Omnibus Cash @ ZAG (AED)   $10,000   (cust-x)
CR 2000 Customer Cash Wallet AED $10,000 (cust-x)

amount_native on the transaction is 36725; amount_usd is 10000.

Buy security — 10 AAPL @ execPx=$100.05 (bundled brokerage)

Ingest (placeholder):

DR 1200 Omnibus Custody @ GTN      $1000.00  (cust-x)
DR 2010 Customer Wallet USD $0.50 (cust-x) # placeholder brokerage debit
CR 2100 Customer Sec Liab Equity $1000.00 (cust-x)
CR 2010 Customer Wallet USD $1000.50 (cust-x) # all-in credit
CR 4000 Brokerage Revenue $0.50 (cust-x) # placeholder

Recost overwrites the placeholder pair:

(delete CR 4000 $0.50)
DR 5000 Brokerage Cost $0.40 (cust-x) # GTN's cost
CR 2310 GTN Payable $0.40 (cust-x)
DR 5099 Valura Earnings Share $0.10 (cust-x) # residual
CR 2330 Valura Payable $0.10 (cust-x)

Sell security

Similar shape, opposite direction. Wallet credited proceeds all-in; custody + sec liab drop by cost basis. UAE reports realized gain via customer statements (not the GL).

Brokerage (standalone from ZAG, itemized)

DR 2010 Customer Wallet USD        $2.00     (cust-x)
CR 4000 Brokerage Revenue $2.00 (cust-x)

Recost:

(delete CR 4000)
DR 5000 Brokerage Cost $1.00 (cust-x) # Aldar cost
CR 2320 Aldar Payable $1.00 (cust-x)
DR 5090 Aldar Brokerage Share $1.00 (cust-x)
DR 5099 Valura Earnings Share $1.00 (cust-x)
CR 2330 Valura Payable $1.00 (cust-x)

Dividend — $10 gross with 25% US withholding

DR 1100 Omnibus Cash @ GTN         $10.00    (cust-x)
CR 2010 Customer Cash Wallet USD $10.00 (cust-x)

Separate wht_tax:

DR 2010 Customer Cash Wallet USD   $2.50     (cust-x)
CR 2200 Withholding Tax Payable $2.50 (cust-x)

Wallet net = +$7.50 (customer receives net).

Wire out — USD $5,000 withdrawal

DR 2010 Customer Cash Wallet USD   $5,000    (cust-x)
CR 1100 Omnibus Cash @ GTN $5,000 (cust-x)

Regulatory fee (SEC / TAF, standalone)

DR 2010 Customer Cash Wallet USD   $0.02     (cust-x)
CR 2220 Regulatory Fee Payable $0.02 (cust-x)

Reversal

POST /v1/transactions/{txn_id}/reverse

Produces a new Transaction with txn_type="reversal", reverses_txn_id=<orig>, and journal lines that MIRROR the original's posted lines (dr ↔ cr swap). Idempotent — a second call returns the existing reversal.

Trial balance invariant

Across all customers, all txns, all lines: ΣDR = ΣCR in USD, always. The Category-A check trial_balance_zero verifies this on every cycle.