Skip to main content
GET
/
balances
/
{balance_id}
Balance from source
curl --request GET \
  --url http://localhost:5001/balances/{balance_id} \
  --header 'X-blnk-key: <api-key>'
Use client.LedgerBalance.Get with FromSource set to true to reconstruct a balance from its transactions.
1

Call the method

client.LedgerBalance.Get
balance, resp, err := client.LedgerBalance.Get(
	"bln_5ce86029-3c2e-4e2a",
	&blnkgo.GetBalanceRequest{FromSource: true},
)
FieldTypeDescription
balanceIDstringBalance ID to compute from source.
FromSourceboolMust be true to reconstruct from transactions.
2

Compare with stored balance

Use the computed amounts to audit or reconcile against the stored balance. Differences may indicate pending transactions or snapshot lag.
3

Response

200 OK
{
  "balance": 9620000,
  "balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
  "credit_balance": 9620000,
  "currency": "USD",
  "debit_balance": 0,
  "ledger_id": "ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb",
  "identity_id": "",
  "created_at": "2024-11-26T08:36:36.238244338Z",
  "meta_data": null
}
FieldTypeDescription
balancenumberNet amount computed from all transactions.
balance_idstringUnique ID for the balance.
credit_balancenumberTotal computed from credit transactions.
debit_balancenumberTotal computed from debit transactions.
currencystringCurrency of the balance.
ledger_idstringLedger this balance belongs to.
identity_idstringLinked identity, if any.
created_atstringDate and time the balance was created.
meta_dataobjectOptional metadata on the balance.

Balance from source guide

Transaction-based balance computation.

Balance from source

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.