The v2 API uses cursor-based pagination to retrieve large result sets in batches. Instead of specifying a page number, the identifier of the last record received is passed to the API, which returns the next batch starting from that point. Because the cursor points at an existing record instead of a page number, new data inserted at the head of the list does not shift already-seen pages. Three endpoints support pagination:Documentation Index
Fetch the complete documentation index at: https://companyname-a7d5b98e-v2-pagination.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
| Endpoint | Cursor parameters | End of results signal |
|---|---|---|
getTransactions | lt + hash | Response returns fewer results than limit |
getBlockTransactions | after_lt + after_hash | incomplete field is false |
getBlockTransactionsExt | after_lt + after_hash | incomplete field is false |
getTransactions
Returns the transaction history of a given account. Results are ordered by logical time in descending order (newest first).
Pagination uses lt and hash as a cursor pair. Both must be provided together. These values come from the last transaction in the previous response.
Pagination parameters
All pagination parameters are optional. They are omitted for the first request and included on subsequent pages.| Parameter | Type | Description |
|---|---|---|
lt | integer | Logical time of the transaction to start from. Must be sent with hash. |
hash | string | Hash of the transaction to start from (base64 or hex). Must be sent with lt. |
to_lt | integer | Logical time to stop at (returns transactions from lt down to to_lt). |
limit | integer | Maximum number of transactions to return. |
Paginate through transactions
Fetch the first page
Send a request with only Response (abbreviated):
address and limit. No cursor parameters are needed for the first page.Extract the cursor from the last transaction
Take the
lt and hash from the last transaction in the response. In this case:lt:66784070000010hash:jYTMpoesWRQ9gs9sbiYcRu+raNOU1Jd3bqCC9V/ntFU=
Fetch the next page
Pass the extracted Response (abbreviated):
lt and hash as query parameters to get the next batch.Repeat until the last page
Continue extracting the cursor from the last transaction and fetching the next page.All results have been retrieved when the response returns fewer transactions than the
limit. Because the cursor is inclusive, a full subsequent page delivers limit - 1 new transactions (the first item is the cursor duplicate), so a response containing only the cursor transaction (1 item) also counts as an end signal.Full pagination script
Full pagination script
Fetching a specific range
Useto_lt to stop pagination at a specific logical time instead of iterating through the entire history:
getBlockTransactions
Returns a list of short transaction identifiers for all transactions in a given block.
Pagination uses after_lt and after_hash as a cursor pair. Both must be provided together. The response includes an incomplete field that indicates whether more transactions remain in the block.
Pagination parameters
All pagination parameters are optional. They are omitted for the first request and included on subsequent pages.| Parameter | Type | Description |
|---|---|---|
after_lt | integer | Return transactions after this logical time. Must be sent with after_hash. |
after_hash | string | Return transactions after this hash. Must be sent with after_lt. |
count | integer | Maximum number of transactions to return per request. |
Paginate through block transactions
Fetch the first page
Send a request with the block identifiers (Response:The
workchain, shard, seqno) and count. No cursor parameters are needed for the first page.incomplete field is true, meaning there are more transactions in this block.Extract the cursor from the last transaction
Take the
lt and hash from the last transaction in the response. In this case:lt:67098924000005hash:hYMkXXLa8SUI7BumkwtWnwge+nH9KB5B/0ICBqdyaKQ=
Full pagination script
Full pagination script
getBlockTransactionsExt
Returns full transaction details for all transactions in a given block. Pagination works the same way as getBlockTransactions, using after_lt and after_hash as cursors with the incomplete field as the end of results signal. The only difference is that this endpoint returns complete transaction objects instead of short identifiers.
Pagination parameters
Pagination parameters are identical togetBlockTransactions. See the getBlockTransactionsExt reference for all available parameters.
Paginate through extended block transactions
Extract the cursor from the last transaction
Take the
lt and hash from the last transaction’s transaction_id. In this case:lt:67098924000005hash:hYMkXXLa8SUI7BumkwtWnwge+nH9KB5B/0ICBqdyaKQ=
Full pagination script
Full pagination script