CKB Pulse

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

Prefer
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)

More about CKB node, RPC and indexer

All 45 in this topic

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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.