Health & observability
How to check the ledger is healthy end-to-end, and what to look at in each report.
The health flow
Three checks tell you the whole book is healthy:
- Both backends respond
ready. DB reachable, migrations at head. - Trial balance balances. Category-A recon returns
okon both books. - The India-only tables reconcile. No
failon Category-B or C checks.
What each report signals
| Report | Look for |
|---|---|
| ViewTrade overview | Total funding in/out, buy/sell counts, brokerage revenue vs ViewTrade payable |
| GlomoPay overview | Total remitted (USD + INR), confirmed vs paid, FX-spread revenue, per-PAN LRS |
| Treasury | Merchant balance should be non-negative, live INR→USD rate |
| NAV / MTM | Valued vs no-link vs error counts, firm NAV, top positions |
| Capital gains | Realized STCG/LTCG, open lots, oversell warnings |
| Dividends | Effective WHT % should be near the DTAA rate (~25%) |
| Schedule FA | Per-asset acquisition + initial + peak (lower bound) + closing + income + WHT |
| LRS / TCS | Per-PAN cap utilisation, TCS basis (actual/estimate/mixed) |
| Holdings recon | Reconciled vs flagged; mismatch / ledger-only / viewtrade-only counts |
| LRS ↔ ViewTrade recon | matched / in-transit / unmatched-funding + per-customer diff |
| Remittance exceptions | Actionable count (non-zero = follow up) |
| Settlement audit | Missing UTR count, uncoded purpose-code count, lag stats |
| Broker fees | Modeled vs expected vs actual drift, Daily-Ledger match rate |
| FX margin | Realized vs assumed, drift, avg realized bps |
| Compliance | Active vs trading_halted vs error customer counts |
| Ledger recon | Per-customer cash+sec variance vs live VT balance |
Signals worth a follow-up
- Any Category-A recon
fail→ trial balance broken. Highest priority. error_count > 0on NAV or Holdings recon → live broker fetch failed for some customers. Check the error field per row.flagged_count > 0on Ledger recon or Holdings recon → real drift. Investigate the flagged customers.actionable_count > 0on Remittance exceptions → a stuck / failed remittance needs someone.missing_utr_count > 0on Settlement audit → credited remittances with no bank reference. Check the settlement-fetch path.uncoded_count > 0on Settlement audit → upstream isn't populating LRS purpose codes.tcs_basis = estimateon LRS/TCS → no quote tax captured; the report is falling back to the 20% estimate.- Large
total_drift_usdon Broker fees → the flat-bps cost assumption is drifting from real fees. Consider a piecewise fee schedule.
Frontend health
Every page has a KPI header. If the numbers render, the endpoint is up. If a card shows an error, the response failed — check backend logs.