Ledger balances
View balance details
Get a balance by ID with the TypeScript SDK.
GET
/balances/{balance_id}Use blnk.LedgerBalances.get to retrieve a balance by its balance ID.
Call the method
const response = await blnk.LedgerBalances.get(
'bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f',
);const response = await blnk.LedgerBalances.get(
'bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f',
{
with_queued: true,
},
);
| Field | Type | Description |
|---|---|---|
id | string | Balance ID to retrieve. |
with_queued | boolean | Optional. When true, includes queued_credit_balance and queued_debit_balance in the response. |
Pass an options object as the second argument to include queued balances:
Use the balance details
Read response.data for current amounts, currency, and ledger membership. Use balance_id when posting transactions or configuring monitors.
Response
{
"balance": 0,
"inflight_balance": 0,
"credit_balance": 0,
"inflight_credit_balance": 0,
"debit_balance": 0,
"inflight_debit_balance": 0,
"ledger_id": "ldg_049495c6-356e-4ebc-a45e-60d1e1e16afb",
"identity_id": "",
"balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
"currency": "USD",
"created_at": "2024-11-26T08:36:36.238244338Z",
"meta_data": null
}
| Field | Type | Description |
|---|---|---|
balance_id | string | Unique ID for the balance. |
balance | number | Current net amount. |
currency | string | Currency or asset class. |
credit_balance | number | Total amount moved into the balance. |
debit_balance | number | Total amount moved out of the balance. |