Ledger balances
Balance from source
Compute balance directly from transactions with the Go SDK.
GET
Balance from source
Use
client.LedgerBalance.Get with FromSource set to true to reconstruct a balance from its transactions.
Call the method
client.LedgerBalance.Get
| Field | Type | Description |
|---|---|---|
balanceID | string | Balance ID to compute from source. |
FromSource | bool | Must be true to reconstruct from transactions. |
Compare with stored balance
Use the computed amounts to audit or reconcile against the stored balance. Differences may indicate pending transactions or snapshot lag.
Response
200 OK
| Field | Type | Description |
|---|---|---|
balance | number | Net amount computed from all transactions. |
balance_id | string | Unique ID for the balance. |
credit_balance | number | Total computed from credit transactions. |
debit_balance | number | Total computed from debit transactions. |
currency | string | Currency of the balance. |
ledger_id | string | Ledger this balance belongs to. |
identity_id | string | Linked identity, if any. |
created_at | string | Date and time the balance was created. |
meta_data | object | Optional metadata on the balance. |
Related docs
Balance from source guide
Transaction-based balance computation.
Balance from source
HTTP request and response schema.