Skip to main content
POST
Query ledger history (Parquet in the instance data lake) through Cloud. This is not the hot Data API, which reads the live instance database. Use this for reporting and audits over a date range. For live lists, filters, and current wallet holdings, use the Data API.
Requires the data:read scope. Production managed instances include a built-in data lake. See Managed instances.
For SQL tables, casts, and templates, see Insights.

Request structure

string
required
Bearer token for an API key or OAuth access token with data:read.
string
required
Core instance whose lake you want to query.
string
Archive range start. Required if end_date is empty. ISO date or datetime.
string
Archive range end. Required if start_date is empty.
string
One read-only DuckDB SELECT or WITH statement. Tables are inferred from the SQL. Do not send resource, resources, or org_id.
string
Run a query saved in Insights instead of sending sql.

SQL response

array
Result rows. Column names match the SQL aliases.
integer
Number of rows returned in this run.

List without SQL

If you omit sql and saved_query_id, send a resource list instead. resource must be one of transactions, balances, ledgers, identity. Include start_date or end_date.

Saved queries

Saved lake queries live under /data/lake/queries. Create body includes instance_id, name, description, sql, range_mode (fixed or rolling), plus either start_date / end_date or rolling_days.

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.