| 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 useslt 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. |
Paginating 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.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 usesafter_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. |
Paginating 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 asgetBlockTransactions, 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
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. |
Paginating 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