| 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 |
URL encodingTransaction hashes are base64-encoded and may contain
+, /, and = characters. These must be URL-encoded when passed as query parameters: + → %2B, / → %2F, = → %3D. Most HTTP libraries handle this automatically, but this is important when constructing URLs manually.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.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Target TON account address (any form). |
limit | integer | Maximum number of transactions to return. | |
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). | |
archival | boolean | If true, only liteservers with full history are used. |
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.Inclusive cursorThe transaction passed as
lt/hash is included as the first result in the next response. In the responses above, transaction 66784070000010 appears as the last item on page 1 and again as the first item on page 2. When implementing pagination, skip the first result on subsequent pages to avoid processing the same transaction twice.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.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workchain | integer | Yes | Block workchain ID. |
shard | integer | Yes | Block shard ID. |
seqno | integer | Yes | Block sequence number. |
count | integer | Maximum number of transactions to return per request. | |
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. | |
root_hash | string | Optional block root hash for validation. | |
file_hash | string | Optional block file hash for validation. |
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=
Exclusive cursorThe cursor for
getBlockTransactions is exclusive. The transaction passed as after_lt/after_hash is not included in the next response. No deduplication is needed.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.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workchain | integer | Yes | Block workchain ID. |
shard | integer | Yes | Block shard ID. |
seqno | integer | Yes | Block sequence number. |
count | integer | Maximum number of transactions to return per request. | |
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. | |
root_hash | string | Optional block root hash for validation. | |
file_hash | string | Optional block file hash for validation. |
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=
Fetch the next page
incomplete field is false. All transactions in this block have been retrieved.Exclusive cursorThe cursor for
getBlockTransactionsExt is exclusive. The transaction passed as after_lt/after_hash is not included in the next response. No deduplication is needed.Full pagination script
Full pagination script