Ledger stores accounts, transactions, logs, and an audit trail, and exposes a read API over each. This section covers retrieving those records, narrowing and paging results, controlling how fresh a read is, and the opt-in indexes and stored queries that some reads need.
Read an account or transaction directly when you know its identity. Add another query feature only when the read needs it.
Choose only what the read needs#
| Need | Start with | Add when required |
|---|---|---|
| One known account or transaction | Direct lookup by full address or transaction ID | Nothing else; direct lookups do not require an opt-in index |
| A subset of records | A target-specific filter | The index required by each filter condition |
| More rows than one response | Pagination | Keep the filter, order, and page size unchanged between pages |
| A read that must include a completed write | The write's returned log sequence | A minimum-log-sequence wait on supported gRPC reads, or the prepared-query freshness gate |
| Several reads of one fixed state | A query checkpoint | The same checkpoint ID on every read and every page |
| One reviewed query shared by several callers | A prepared query | Runtime parameters for values that change per request |
| A description of existing data patterns | Analysis | A planned capacity window, or a write pause when the result must be reproducible |
Readiness and v3.0 limits
An index-dependent query is ready only after every replica that can serve the read reports a usable local version. Creating the index starts that work; it does not complete it.
In Ledger v3.0, prepared queries accept minLogSequence but not a query checkpoint. Use direct gRPC reads when several queries or pages must share one frozen checkpoint.
Query results describe stored data, but they do not verify its integrity. Use Verify Ledger Integrity when you need an integrity assessment.