Available in version 0.8.4 and later.
Overview
The Historical Balances endpoint allows users to retrieve balances (identified bybalance_id
) at a particular historical point in time, specified by the timestamp parameter.
It leverages Blnk’s balance snapshot feature to provide accurate historical data for financial reporting, auditing, or analysis.
Always format the date input as ‘YYYY-MM-DDTHH:MM:SS+00:00’ (e.g., 2024-04-22T15:28:03+00:00), where
+00:00
specifies the timezone. It is UTC by default.Example response
How it works
When querying for a balance at a specific timestamp, Blnk follows these steps to ensure accuracy and reliability:-
Identify the most recent snapshot: The system retrieves the most recent snapshot taken before the requested timestamp. Snapshots are daily records of balances, captured manually by users as described in the Balance Snapshots feature.
If no snapshot is found, Blnk builds the historical balance from genesis (using transactions only).
- Apply intervening transactions: It then applies all transactions that occurred between the time of the snapshot and the requested timestamp. This reconstructs the balance state by accounting for any credits, debits, or other financial activities that took place during that period.
- Return the computed balance: The final computed balance, reflecting the exact state at the requested timestamp, is returned in the response.
Balance snapshots
Learn how balance snapshots work
Reconstruct balances from source
Available on version 0.10.1 or later.
from_source=true
in your request URL: