All lessons · CKB node, RPC and indexer · Start here · Glossary
Paging indexer get_cells and get_transactions with last_cursorWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
The built-in indexer RPCs get_cells and get_transactions return at most the requested limit (here 0x3e8) plus a last_cursor. To read all results for a search key, pass last_cursor as the fourth param on the next call and stop once a page returns fewer objects than the limit; a single call with a small limit (the old 0xc8 or 0x19) undercounts cells and transactions.
Why it matters: With one call, the address page saw only the first 200 cells and 25 transactions. Live cell counts, occupied capacity, token balances and transaction totals were therefore wrong for any lock with more results than that.
Pattern
const params: unknown[] = [key, "desc", "0x3e8"]; if (cursor) params.push(cursor);Taken from the commit, shortened.
- Concepts
- Indexer queries and cell collection, Network and RPC reliability
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-30
- Last changed
- 2026-10-30
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-10-30 · wildanrhmn/ckb-devnet-explorer · more from this project
More about CKB node, RPC and indexer
- get_live_cell may return "unknown" rather than "dead" for a spent output
- Wait for get_indexer_tip to reach the commit block before re-reading cells
- Check indexer lag with get_indexer_tip before signing
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Paging indexer get_cells and get_transactions with last_cursor", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/paging-indexer-get-cells-and-get-transactions-with-last-curs, CC BY 4.0, last changed 2026-10-30.