Skip to main content
GET
/
balances
/
{balance_id}
/
at
Historical balances
curl --request GET \
  --url http://localhost:5001/balances/{balance_id}/at \
  --header 'X-blnk-key: <api-key>'
Use client.LedgerBalance.GetHistorical to retrieve a balance at a specific point in time.
1

Call the method

client.LedgerBalance.GetHistorical
timestamp, _ := time.Parse(time.RFC3339, "2025-02-24T08:55:26Z")

historical, resp, err := client.LedgerBalance.GetHistorical(
	"bln_5ce86029-3c2e-4e2a",
	timestamp,
	false,
)
FieldTypeDescription
balanceIDstringBalance ID to query.
timestamptime.TimePoint in time for the historical balance. Parse ISO 8601 strings with time.Parse(time.RFC3339, "...").
fromSourceboolWhen true, reconstruct from transactions instead of snapshots.
2

Use the historical amounts

Read historical.Balance for net, credit, and debit totals at the requested timestamp. Compare with the current balance if you are auditing or reconciling.
3

Response

200 OK
{
  "timestamp": "2025-02-24T08:55:26Z",
  "from_source": false,
  "balance": {
    "balance_id": "bln_5ce86029-3c2e-4e2a-aae2-7fb931ca4c4f",
    "balance": 5000,
    "credit_balance": 5000,
    "debit_balance": 0,
    "currency": "USD"
  }
}
FieldTypeDescription
timestampstringPoint in time you queried (ISO 8601).
from_sourcebooleanWhether the balance was reconstructed from transactions.
balance.balance_idstringBalance you queried.
balance.balancenumberNet amount at that timestamp.
balance.credit_balancenumberTotal credits at that timestamp.
balance.debit_balancenumberTotal debits at that timestamp.
balance.currencystringCurrency of the balance.

Retrieving historical balances

How point-in-time balance queries work.

Historical balances

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.