Node API
Supported Chains
API Reference
TON

TON

TON API is available on Web3 API platform (opens in a new tab).

The Open Network (TON) is a decentralized and open internet platform made up of several components. These include: TON Blockchain, TON DNS, TON Storage, and TON Sites. TON Blockchain is the core protocol that connects TON’s underlying infrastructure together to form the greater TON Ecosystem.

TON is focused on achieving widespread cross-chain interoperability, while operating in a highly scalable secure framework. TON is designed to process millions of transactions per second (TPS), with the goal of eventually reaching hundreds of millions of users moving forward.

Currently, we provide two interfaces to query TON API — JSON-RPC (opens in a new tab) and REST. Responses for both of them come in JSON format (opens in a new tab).

JSON-RPC/REST methods

Accounts — info about accounts:

Blocks — info about blocks:

Transactions — fetching and locating transactions:

Get config — getting blockchain config:

Run method — running get method of smart contract:

Send — sending data to blockchain:


getAddressInformation

Retrieves basic information about the address: balance, code, data, last_transaction_id.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

Information about the address specified.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getAddressInformation?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "id": "1",
    "jsonrpc": "2.0",
    "result": {
        "@type": "raw.fullAccountState",
        "balance": "6088697",
        "code": "te6cckEBAQEAIwAIQgKPRS16Tf10BmtoI2UXclntBXNENb52tf1L1divK3w9aCBrv3Y=",
        "data": "te6cckEBAQEARgAAhwCAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAsROplLUCShZxn2kTkyjrdZWWw4ol9ZAosUb+zcNiHf6+xcGRA==",
        "last_transaction_id": {
            "@type": "internal.transactionId",
            "lt": "50630341000001",
            "hash": "/PZphaovGJ1xCTklvEPzGszPvBaotdzWcon79et+Nvw="
        },
        "block_id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 41748127,
            "root_hash": "LUtR/YNt5qJdLeo2AJAPcoTRbhTx1K2c+sMPkRMT8mA=",
            "file_hash": "iOOCR19ILPA9vbpJ8KbhsY76Ns03GitAcF2sMWIkRG4="
        },
        "frozen_hash": "",
        "sync_utime": 1730904471,
        "@extra": "1730904488.9606094:0:0.8056820862639625",
        "state": "active"
    }
}

getExtendedAddressInformation

Retrieves extended address info.

Similar to previous one but tries to parse additional information for known contract types. This method is based on tonlib's function getAccountState. For detecting wallets we recommend to use getWalletInformation.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

Information about the address specified.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getExtendedAddressInformation?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": {
        "@type": "fullAccountState",
        "address": {
            "@type": "accountAddress",
            "account_address": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W"
        },
        "balance": "6088697",
        "last_transaction_id": {
            "@type": "internal.transactionId",
            "lt": "50630341000001",
            "hash": "/PZphaovGJ1xCTklvEPzGszPvBaotdzWcon79et+Nvw="
        },
        "block_id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 41748257,
            "root_hash": "BtEIAxrUco9i3qeK0lb3FNnuupSQdwu/b35cn7eNqTg=",
            "file_hash": "Ojn6XMPRb8BZ6gJ/ibpWF6V+e+wUh0jh+8UwV+UkIBc="
        },
        "sync_utime": 1730904823,
        "account_state": {
            "@type": "raw.accountState",
            "code": "te6cckEBAQEAIwAIQgKPRS16Tf10BmtoI2UXclntBXNENb52tf1L1divK3w9aCBrv3Y=",
            "data": "te6cckEBAQEARgAAhwCAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAsROplLUCShZxn2kTkyjrdZWWw4ol9ZAosUb+zcNiHf6+xcGRA==",
            "frozen_hash": ""
        },
        "revision": 0,
        "@extra": "1730904845.8151195:0:0.1685316976114063"
    }
}

getWalletInformation

Retrieves wallet info.

This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

Information about the address specified.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getWalletInformation?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": {
        "wallet": false,
        "balance": "6088697",
        "account_state": "active",
        "wallet_type": null,
        "seqno": null,
        "last_transaction_id": {
            "@type": "internal.transactionId",
            "lt": "50630341000001",
            "hash": "/PZphaovGJ1xCTklvEPzGszPvBaotdzWcon79et+Nvw="
        }
    }
}

getTransactions

Retrieves transactions.

Retrieves transaction history of a given address.

Parameters


  • address (string; query; required): an identifier of a target TON account.
  • limit (integer; query; default=10, max=100): maximum number of transactions in response.
  • lt (integer; query): logical time of transaction to start with, must be sent with hash.
  • hash (string; query): the hash of transaction to start with, in base64 or hex encoding , must be sent with lt.
  • to_lt (integer; query): logical time of transaction to finish with (to get tx from lt to to_lt).
  • archival (boolean; query; default=false): by default getTransaction request is processed by any available liteserver. If archival=true only liteservers with full history are used.

Returns

The transaction history for a specific address.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getTransactions?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": [
        {
            "@type": "raw.transaction",
            "utime": 1730897178,
            "data": "te6cckECDwEAAywAA7V/l26clqHVRGrod9+7tISkJI53k+e7PGKqChEe+RI36rAAAuDEt9e0EUhqqRoLlokU16oee06iuNKCfrXMhyS9QXJLNJK+RvjwAALf81h8KBZytlGgADRhjwMIAQIDAgHgBAUAgnKmm1F2uF+qjoLb+DOkjIiO+1S2/rUFfz/9X0ecgCrNJJxt7rYpNtcbz4bUhkV3+hJYM6a4v6txgynCn27hbW/LAhkEhZUJANqpBRhgw1ARDQ4BsWgAAHEQFvmJp3gRyAJ1sBIV0YcBim66VsLr6L2rS6H3pL8APl26clqHVRGrod9+7tISkJI53k+e7PGKqChEe+RI36rQDaqQUAYQFLQAAFwYloDkhM5Wyh7ABgEB3wcBqA+KfqVUbeTv2XoE7jY5HJgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kAAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfCAwwCsWgB8u3TktQ6qI1dDvv3dpCUhJHO8nz3Z4xVQUIj3yJG/VcAIzum7Z4PaYlBTeFvKo6mdRJVSxaBZjYWdNcZV1Ty5TgQDUbO0AYZHTgAAFwYlvr2hM5WyjXgCAkCATQKCwGnF41FGVRt5O/ZegTuNjkcmAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAADiIC3zE07wI5AE62AkK6MOAxTddK2F19F7VpdD70l8QHDAhCAo9FLXpN/XQGa2gjZRdyWe0Fc0Q1vna1/UvV2K8rfD1oAIcAgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kALETqZS1AkoWcZ9pE5Mo63WVlsOKJfWQKLFG/s3DYh3+gAaAAAAADEwOTUxNTg2OACeQH0MCL8UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABvyYlq8EwZHRAAAAAAAAIAAAAAAALC24AfOr7B+9wHRF8yKXY1QVDD2tgXWyS0aakzhF8WbEGQR6TI4r5Y",
            "transaction_id": {
                "@type": "internal.transactionId",
                "lt": "50630341000001",
                "hash": "/PZphaovGJ1xCTklvEPzGszPvBaotdzWcon79et+Nvw="
            },
            "fee": "1640116",
            "storage_fee": "5716",
            "other_fee": "1634400",
            "in_msg": {
                "@type": "raw.message",
                "source": "EQAAOIgLfMTTvAjkATrYCQrow4DFN10rYXX0XtWl0PvSX5uk",
                "destination": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W",
                "value": "57320468",
                "fwd_fee": "526938",
                "ihr_fee": "0",
                "created_lt": "50630337000002",
                "body_hash": "vt02QoQHP7hw48TBJm8i1YII+Zx8kL/QfNVj79Kmt7w=",
                "msg_data": {
                    "@type": "msg.dataRaw",
                    "body": "te6cckEBAgEAZgABqA+KfqVUbeTv2XoE7jY5HJgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kAAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfCAwEAGgAAAAAxMDk1MTU4NjicCb0U",
                    "init_state": ""
                },
                "message": "D4p+pVRt5O/ZegTuNjkcmAHzNijAFciaXiVi8dGN1XrxElXQWLyLbRMfO9b9ZAfziQAADiIC3zE0\n7wI5AE62AkK6MOAxTddK2F19F7VpdD70l8ID\n"
            },
            "out_msgs": [
                {
                    "@type": "raw.message",
                    "source": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W",
                    "destination": "EQCM7pu2eD2mJQU3hbyqOpnUSVUsWgWY2FnTXGVdU8uU4Ddb",
                    "value": "55686068",
                    "fwd_fee": "822940",
                    "ihr_fee": "0",
                    "created_lt": "50630341000002",
                    "body_hash": "Ycyf2S915TpjkcLaOH70Kse87Z1rZrF65nPLm/70Rms=",
                    "msg_data": {
                        "@type": "msg.dataRaw",
                        "body": "te6cckEBAgEAZgABpxeNRRlUbeTv2XoE7jY5HJgAAHEQFvmJp3gRyAJ1sBIV0YcBim66VsLr6L2rS6H3pL8AAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfEBwEAGgAAAAAxMDk1MTU4NjhoTgE0",
                        "init_state": "te6cckEBAwEAbgACATQBAghCAo9FLXpN/XQGa2gjZRdyWe0Fc0Q1vna1/UvV2K8rfD1oAIcAgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kALETqZS1AkoWcZ9pE5Mo63WVlsOKJfWQKLFG/s3DYh3+vXib6g="
                    },
                    "message": "F41FGVRt5O/ZegTuNjkcmAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAADiIC3zE0\n7wI5AE62AkK6MOAxTddK2F19F7VpdD70l8QG\n"
                }
            ]
        }
    ]
}

getAddressBalance

Retrieves address balance.

Retrieves balance (in nanotons) of a given address.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

The balance of a specific address on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getAddressBalance?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": "6088697"
}

getAddressState

Retrieves address state.

Retrieves state of a given address. State can be either unitialized, active, or frozen.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

Checks whether an address is active, uninitialized, or frozen.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getAddressState?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": "active"
}

packAddress

Packs address.

Convert an address from raw to human-readable format.

Parameters


  • address (string; query; required): an identifier of a target TON account in raw format. Example: 0:83DFD552E63729B472FCBCC8C45EBCC6691702558B68EC7527E1BA403A0F31A8.

Returns

Converts TON addresses to a more readable and standardized output.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/packAddress?address=0%3A83DFD552E63729B472FCBCC8C45EBCC6691702558B68EC7527E1BA403A0F31A8

Response example

{
    "ok": true,
    "result": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N"
}

unpackAddress

Unpacks address.

Converts an address from human-readable to raw format.

Parameters


  • address (string; query; required): an identifier of a target TON account in user-friendly form. Example: EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N.

Returns

Converts human-readable addresses into raw format.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/unpackAddress?address=EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N

Response example

{
    "ok": true,
    "result": "0:83dfd552e63729b472fcbcc8c45ebcc6691702558b68ec7527e1ba403a0f31a8"
}

getTokenData

Retrieves token data.

Retrieves NFT or Jetton information.

Parameters


  • address (string; query; required): the address of NFT collection/item or Jetton master/wallet smart contract.

Returns

Data about a specific token on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getTokenData?address=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs

Response example

{
    "ok": true,
    "result": {
        "total_supply": 1229976002510000,
        "mintable": true,
        "admin_address": "EQBkQP48aUEDg5Y5RRc8SxFHm_C5tNcJDlh3e9pYHC-ZmG2M",
        "jetton_content": {
            "type": "onchain",
            "data": {
                "uri": "https://tether.to/usdt-ton.json",
                "decimals": "6"
            }
        },
        "jetton_wallet_code": "te6cckEBAQEAIwAIQgKPRS16Tf10BmtoI2UXclntBXNENb52tf1L1divK3w9aCBrv3Y=",
        "contract_type": "jetton_master"
    }
}

detectAddress

Detects address.

Retrieves all possible address forms.

Parameters


  • address (string; query; required): an identifier of a target TON account.

Returns

Detects the type and format of a TON address.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/detectAddress?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": {
        "raw_form": "0:f976e9c96a1d5446ae877dfbbb484a4248e7793e7bb3c62aa0a111ef91237eab",
        "bounceable": {
            "b64": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN+q19W",
            "b64url": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W"
        },
        "non_bounceable": {
            "b64": "UQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN+qwKT",
            "b64url": "UQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-qwKT"
        },
        "given_type": "friendly_bounceable",
        "test_only": false
    }
}

getMasterchainInfo

Retrieves masterchain info.

Retrieves up-to-date masterchain state.

Parameters

None.

Returns

Information about the current state of the TON masterchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getMasterchainInfo

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.masterchainInfo",
        "last": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 41808232,
            "root_hash": "OARlTgr+YA5SqBL3SOxIFiTve/E397qeDIshLmZzwNA=",
            "file_hash": "ragbYfalWXeldsyZZ2BSBJwqtOLsw6ifLrpyWhnVduo="
        },
        "state_root_hash": "p/eRavA1zOrMtonVIuhvQ22JhsbgtzUu6bUDUGoPVvg=",
        "init": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "0",
            "seqno": 0,
            "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=",
            "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24="
        },
        "@extra": "1731069303.2264078:0:0.6208585424366947"
    }
}

getMasterchainBlockSignatures

Retrieves masterchian block signatures.

Retrieves the signatures of a specific masterchain block on the TON blockchain.

Parameters


  • seqno (integer; query; required): the sequence number of the masterchain block for which to retrieve signatures.

Returns

Detects the type and format of a TON address.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getMasterchainBlockSignatures?seqno=39064865

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.blockSignatures",
        "id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 39064865,
            "root_hash": "AovDThkPXWEPiYOBVzYpQW9Mf/B1DXRVK2jNCEaMuUk=",
            "file_hash": "vTGEDDjoVzWCR+Yz/DUAUSMNfIjl7LL/I0ynpAYz4rk="
        },
        "signatures": [
            {
                "@type": "blocks.signature",
                "node_id_short": "/DM6Q8OqwsiL/lo0h6yryoGLXLBxW9dXXGLfduMkwSQ=",
                "signature": "dQStdfk5/FrUiTvJ6uuSaHT8xq5IvIn5Oj9evkP5BExrhMhZ4yAF/S49eP9AmVBCu6k4DHZwlYkoErGrYMsLBw=="
            },
            {
                "@type": "blocks.signature",
                "node_id_short": "mwccnaYVl/CYI/QcZEas6hv01zM4BDR9FegiGvuRYYY=",
                "signature": "Oo18FpSQB82eyeVJjUAnYPcHtvmI/uO17nWb6rnrp9yvAjJhHMrb386gqcH2eEwIVcveUR9smPOZzNMeEmXyCQ=="
            }
        ],
        "@extra": "1731069520.765146:0:0.3486811129074091"
    }
}

getShardBlockProof

Retrieves shard block proof.

Retrieves the proof of a specific shard block on the TON blockchain.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the masterchain block for which to retrieve signatures.
  • from_seqno (integer; query): the sequence number of the masterchain block starting from which the proof is required. If not specified latest masterchain block is used.

Returns

The proof of a specific shard block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getShardBlockProof?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.shardBlockProof",
        "from": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 41808549,
            "root_hash": "s7xGa9Mp3ly90+p6CEyQ2jQgC4lhFktWBC99VCNalhA=",
            "file_hash": "otXbmchM7gVDOnMo99RcezYGKv7XOICChVs15K5mFu8="
        },
        "mc_id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 39064985,
            "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
            "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
        },
        "links": [],
        "mc_proof": [
            {
                "@type": "blocks.blockLinkBack",
                "to_key_block": false,
                "from": {
                    "@type": "ton.blockIdExt",
                    "workchain": -1,
                    "shard": "-9223372036854775808",
                    "seqno": 41808549,
                    "root_hash": "s7xGa9Mp3ly90+p6CEyQ2jQgC4lhFktWBC99VCNalhA=",
                    "file_hash": "otXbmchM7gVDOnMo99RcezYGKv7XOICChVs15K5mFu8="
                },
                "to": {
                    "@type": "ton.blockIdExt",
                    "workchain": -1,
                    "shard": "-9223372036854775808",
                    "seqno": 39064985,
                    "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
                    "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
                },
                "dest_proof": "te6ccgECBwEAAUcACUYD8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/sAFgEkEBHvVar///8RAgMEBQGgm8ephwAAAAAEAQJUFZkAAAABAP////8AAAAAAAAAAGaXMXwAACt6kiZ7gAAAK3qSJnuEhbCm0wAI8i0CVBWVAlQU...",
                "proof": "te6ccgECCQEAAfoACUYDs7xGa9Mp3ly90+p6CEyQ2jQgC4lhFktWBC99VCNalhAAFQEkEBHvVar///8RAgMEBQGgm8ephwAAAAAEAQJ98qUAAAABAP////8AAAAAAAAAAGcuCMYAAC4bdxckQAAALht3FyRELyM3uwAJjQ4CffKhAn2ug8QAAAAJAAAAAAAAAe4GKEgBAXr54c8Gc+eWcHETEHYK/CztB+T1ieXVEoBn1572ldkCAAMqigRpFcGq8hDStc521CzfSTiXxjfhoWUP1kP/q+8wjF6fkv4hVokx69NGJUjnOO8UvPQC/j...",
                "state_proof": "te6ccgECcAEADIkACUYD/iFWiTHr00YlSOc47xS89AL+P4rCuq4G0iP3ZgTHMsABbwEkW5Ajr+L///8RAP////8AAAAAAAAAAAJ98qUAAAABZy4IxgAALht3FyREAn3yoWACAwQFKEgBAUUKG6HVTbjHrjXJoRaa4m9/CZLcQ8jQHvlvDAcBD2rwAAEoSAEB0du2kTZcVh2Ne1F8P0D7eOk45xNyeq8QG794Zq98TmQBbiIzAAAAAAAAAAD//////////4HBuempBkmw+CgGByRVzCaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsI4MhMW7ZfvfggJCgsoSAEBpafSQFfYZDslJ3CdmGzaOEatyz7dwy0o7CH2nhfbqu8AAShIAQFH1daNUVAp9rX2NNYO0AXdnjuS9fglxh8OI1KoLN2vrAAlKEgBATJfFYvXj+BzkWTrjA8QIG3vJcXD/xs..."
            }
        ],
        "@extra": "1731070166.2531776:0:0.6464551742790462"
    }
}

getConsensusBlock

Retrieves consensus block.

Retrieves the consensus block and its update timestamp.

Parameters

None.

Returns

Information about the latest consensus block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getConsensusBlock

Response example

{
    "ok": true,
    "result": {
        "consensus_block": 41808671,
        "timestamp": 1731070487.261679
    }
}

lookupBlock

looks up block.

Retrieves detailed information about a specific block in the TON blockchain.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the block. Example: 39064985.
  • lt (integer; query): the block's logical time.
  • unixtime (integer; query): the block's unix time.

Returns

Detailed information about a specific block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/lookupBlock?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "ton.blockIdExt",
        "workchain": -1,
        "shard": "-9223372036854775808",
        "seqno": 39064985,
        "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
        "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M=",
        "@extra": "1731070853.2663236:0:0.3731994442759804"
    }
}

shards

Retrieves shards information.

Parameters


  • seqno (integer; query; required): the sequence number of the masterchain block. Example: 39064985.

Returns

Information about shards for a specific masterchain block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/shards?seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.shards",
        "shards": [
            {
                "@type": "ton.blockIdExt",
                "workchain": 0,
                "shard": "4611686018427387904",
                "seqno": 44599306,
                "root_hash": "c5B0hqpAddUbvNiSf3gjdzRf3CwZwI6Sf0wQsWwOGsA=",
                "file_hash": "ZtTs6ODJrgoBSIs5df5ldHaiamLOpsFT2uSV+5VzFn8="
            },
            {
                "@type": "ton.blockIdExt",
                "workchain": 0,
                "shard": "-4611686018427387904",
                "seqno": 44599315,
                "root_hash": "uf8DTtjRw5hQc1tBi/gD3sCNcFrAjnKeIuPPIUjR3h0=",
                "file_hash": "s0afHo/ReFDI8s6e2+6BjpSRpJjN6ST1DfY1Ke2fMm4="
            }
        ],
        "@extra": "1731071058.0157397:0:0.09471235795206101"
    }
}

getBlockTransactions

Retrieves transactions of a given block.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the block. Example: 39064985.
  • root_hash (string; query): the root hash of the block for which to request transactions.
  • file_hash (string; query): the file hash associated with the block.
  • after_lt (integer; query): the logical time (LT) marker after which to retrieve transactions.
  • after_hash (string; query): the hash of the last transaction from which to continue fetching additional transactions.
  • count (integer; query; default=40): max number of transactions to return.

Returns

Transactions from a specific block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getBlockTransactions?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.transactions",
        "id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 39064985,
            "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
            "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
        },
        "req_count": 40,
        "incomplete": false,
        "transactions": [
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:3333333333333333333333333333333333333333333333333333333333333333",
                "lt": "47805438000001",
                "hash": "oWXZAgtiaqG69JC90PhKUCu/czgLghQVqQGAhxIetMY="
            },
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:3333333333333333333333333333333333333333333333333333333333333333",
                "lt": "47805438000002",
                "hash": "gG/fp7ukb3YHhcqRqhARG24xuNncdgc7dT4aSWLhRCI="
            },
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:5555555555555555555555555555555555555555555555555555555555555555",
                "lt": "47805438000003",
                "hash": "6p8ROuJ33hA6l7SrfhiXG1XB8YUNEnm05IElYQQCDek="
            }
        ],
        "@extra": "1731071592.980471:0:0.13996576074060574"
    }
}

getBlockTransactionsExt

Retrieves block transactions extended info.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the block. Example: 39064985.
  • root_hash (string; query): the root hash of the block for which to request transactions.
  • file_hash (string; query): the file hash associated with the block.
  • after_lt (integer; query): the logical time (LT) marker after which to retrieve transactions.
  • after_hash (string; query): the hash of the last transaction from which to continue fetching additional transactions.
  • count (integer; query; default=40): max number of transactions to return.

Returns

Detailed information about transactions from a specific block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getBlockTransactionsExt?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
  "ok": true,
  "result": {
    "@type": "blocks.transactionsExt",
    "id": {
      "@type": "ton.blockIdExt",
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 39064985,
      "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
      "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
    },
    "req_count": 40,
    "incomplete": false,
    "transactions": [
      {
        "@type": "raw.transaction",
        "address": {
          "@type": "accountAddress",
          "account_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"
        },
        "utime": 1721184636,
        "data": "te6cckECBgEAASwAA69zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzAAArepIme4GscsDwDDBgx9i/DeB5aFmy2vrV8aOK0rP/cq/8TPKZcwAAK3qSFzlCZpcxfAABQIAQIDAAEgAIJy8I5H0zoxilm4IYvCWq+YZvggOAzax3zPCIkpOOBNG8wO3imDKvL7ljWwH4GPI4A1OWEW8XeiXiwJjU86+K4vmQIFIDAkBAUAoEMBkBCwdgAAAAAAAAAAAIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFvAAAAAAAAAAAAAAAABLUUtpEnlC4z33SeGHxRhIq/htUa7i3D8ghbwxhQTn44ES774TA==",
        "transaction_id": {
          "@type": "internal.transactionId",
          "lt": "47805438000001",
          "hash": "oWXZAgtiaqG69JC90PhKUCu/czgLghQVqQGAhxIetMY="
        },
        "fee": "0",
        "storage_fee": "0",
        "other_fee": "0",
        "out_msgs": [],
        "account": "-1:3333333333333333333333333333333333333333333333333333333333333333"
      },
      {
        "@type": "raw.transaction",
        "address": {
          "@type": "accountAddress",
          "account_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"
        },
        "utime": 1721184636,
        "data": "te6cckECBwEAAYoAA69zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzAAArepIme4KhZdkCC2Jqobr0kL3Q+EpQK79zOAuCFBWpAYCHEh60xgAAK3qSJnuBZpcxfAABQIAQIDAQGgBACCcg7eKYMq8vuWNbAfgY8jgDU5YRbxd6JeLAmNTzr4ri+ZpP0ft+83iz9Yc0BgMlvUwWg3jAnIjmISfn+TgvvOiOICDwQJLVTvQJgRBQYAq2n+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE/zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzS1U70CAAAAFb1JEz3AM0uYvhAAKBCr3AQsHYAAAAAAAAAAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABbwAAAAAAAAAAAAAAAAS1FLaRJ5QuM990nhh8UYSKv4bVGu4tw/IIW8MYUE5+OBOSEDw0=",
        "transaction_id": {
          "@type": "internal.transactionId",
          "lt": "47805438000002",
          "hash": "gG/fp7ukb3YHhcqRqhARG24xuNncdgc7dT4aSWLhRCI="
        },
        "fee": "0",
        "storage_fee": "0",
        "other_fee": "0",
        "in_msg": {
          "@type": "raw.message",
          "source": {
            "@type": "accountAddress",
            "account_address": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU"
          },
          "destination": {
            "@type": "accountAddress",
            "account_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"
          },
          "value": "3042163970",
          "fwd_fee": "0",
          "ihr_fee": "0",
          "created_lt": "47805438000000",
          "body_hash": "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=",
          "msg_data": {
            "@type": "msg.dataRaw",
            "body": "te6cckEBAQEAAgAAAEysuc0=",
            "init_state": ""
          }
        },
        "out_msgs": [],
        "account": "-1:3333333333333333333333333333333333333333333333333333333333333333"
      },
      {
        "@type": "raw.transaction",
        "address": {
          "@type": "accountAddress",
          "account_address": "Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn"
        },
        "utime": 1721184636,
        "data": "te6cckECBgEAASwAA691VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAAArepIme4OECgCvSheQctVrVPqeBE/WfbkG6v5cpslm2if1ScBQRgAAK3qSFzlDZpcxfAABQIAQIDAAEgAIJyQ/ThOpAPm9H/T3ILcT7NCWm9UnbAgiq5qKeHYGOf36hhkadzn9gB0z9C3sKgAmTwI1mVw0NYAp/yY+U2+xU+aAIFMDAkBAUAoEGCkBCwdgAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFvAAAAAAAAAAAAAAAABLUUtpEnlC4z33SeGHxRhIq/htUa7i3D8ghbwxhQTn44ECXKhng==",
        "transaction_id": {
          "@type": "internal.transactionId",
          "lt": "47805438000003",
          "hash": "6p8ROuJ33hA6l7SrfhiXG1XB8YUNEnm05IElYQQCDek="
        },
        "fee": "0",
        "storage_fee": "0",
        "other_fee": "0",
        "out_msgs": [],
        "account": "-1:5555555555555555555555555555555555555555555555555555555555555555"
      }
    ],
    "@extra": "1731071979.505911:1:0.010321268558367347"
  }
}

getBlockHeader

Retrieves block header.

Retrieves metadata of a given block.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the block. Example: 39064985.
  • root_hash (string; query): the root hash of the block for which to request transactions.
  • file_hash (string; query): the file hash associated with the block.

Returns

Detailed metadata about a block, including its identifiers, state flags, and timing information.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getBlockHeader?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.header",
        "id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 39064985,
            "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
            "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
        },
        "global_id": -239,
        "version": 0,
        "flags": 1,
        "after_merge": false,
        "after_split": false,
        "before_split": false,
        "want_merge": true,
        "want_split": false,
        "validator_list_hash_short": -2052020525,
        "catchain_seqno": 586285,
        "min_ref_mc_seqno": 39064981,
        "is_key_block": false,
        "prev_key_block_seqno": 39064828,
        "start_lt": "47805438000000",
        "end_lt": "47805438000004",
        "gen_utime": 1721184636,
        "vert_seqno": 1,
        "prev_blocks": [
            {
                "@type": "ton.blockIdExt",
                "workchain": -1,
                "shard": "-9223372036854775808",
                "seqno": 39064984,
                "root_hash": "2IPv7Ob6GLJAUa6mnyLRWgiZPumAMtf9I4rKJ4CYA7U=",
                "file_hash": "MlowUE4mRqGoS7aKMmXROnpBDTL35jpZDZDrd+oDtBc="
            }
        ],
        "@extra": "1731074187.3699944:0:0.9581414160490025"
    }
}

getOutMsgQueueSizes

Retrieves messages queue sizes.

Retrieves info with current sizes of messages queues by shards.

Parameters

None.

Returns

Information about the size of message queues associated with a specified block or shard.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getOutMsgQueueSizes

Response example

{
  "ok": true,
  "result": {
    "@type": "blocks.outMsgQueueSizes",
    "shards": [
      {
        "@type": "blocks.outMsgQueueSize",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": -1,
          "shard": "-9223372036854775808",
          "seqno": 41810136,
          "root_hash": "PfkJ9d9Y7C+YuemqU1EZuJHVAYLsW8DarhUvT4vZV9U=",
          "file_hash": "QimWa2jewflBa8R91i8+2/3+FGTGggOe0ObOrxnch8c="
        },
        "size": 1
      },
      {
        "@type": "blocks.outMsgQueueSize",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 0,
          "shard": "2305843009213693952",
          "seqno": 46979192,
          "root_hash": "XWJreLPIZ6hvembivVKNjL7DCB/Zha5eJrMIMLsawGo=",
          "file_hash": "voQ0q1oAGFF6GkiV0I7UUQ3fubnxoeKQ/D7AuFHCJ9U="
        },
        "size": 128
      },
      {
        "@type": "blocks.outMsgQueueSize",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 0,
          "shard": "6917529027641081856",
          "seqno": 46992152,
          "root_hash": "xtxBOJrfNB9E3DMI3X3a1Ydt+/39LF+zJ3O5QQ0JmpE=",
          "file_hash": "hfgU2iDQaZ0vt9hNbcevGWbaWbrQeL9VFjGWqX2XGXY="
        },
        "size": 175
      },
      {
        "@type": "blocks.outMsgQueueSize",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 0,
          "shard": "-6917529027641081856",
          "seqno": 46753006,
          "root_hash": "RZGjpslMKh9r4X/6j/RSNubR3MGFWo2T+II59CG4FpU=",
          "file_hash": "Qskhx4BuIiXKyQKZaL+ZKndM76cI4+4F+Z6RhDF2HFU="
        },
        "size": 117
      },
      {
        "@type": "blocks.outMsgQueueSize",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 0,
          "shard": "-2305843009213693952",
          "seqno": 46951966,
          "root_hash": "CbJl2xiawT0B9iJIgQv6+xllWdRD92kFp83ajojbSdo=",
          "file_hash": "U5A22AXfIQAkeFVZT1yvyoIcREK/vDR8QHBlV9RcI30="
        },
        "size": 113
      }
    ],
    "ext_msg_queue_size_limit": 8000,
    "@extra": "1731074512.3481815:16:0.07293629857925221"
  }
}

getTransactions

Retrieves transactions.

Retrieves transaction history of a given address.

Parameters


  • address (string; query; required): an identifier of a target TON account.
  • limit (integer; query; default=10, max=100): maximum number of transactions in response.
  • lt (integer; query): logical time of transaction to start with, must be sent with hash.
  • hash (string; query): the hash of transaction to start with, in base64 or hex encoding , must be sent with lt.
  • to_lt (integer; query): logical time of transaction to finish with (to get tx from lt to to_lt).
  • archival (boolean; query; default=false): by default getTransaction request is processed by any available liteserver. If archival=true only liteservers with full history are used.

Returns

The transaction history for a specific address.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getTransactions?address=EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W

Response example

{
    "ok": true,
    "result": [
        {
            "@type": "raw.transaction",
            "utime": 1730897178,
            "data": "te6cckECDwEAAywAA7V/l26clqHVRGrod9+7tISkJI53k+e7PGKqChEe+RI36rAAAuDEt9e0EUhqqRoLlokU16oee06iuNKCfrXMhyS9QXJLNJK+RvjwAALf81h8KBZytlGgADRhjwMIAQIDAgHgBAUAgnKmm1F2uF+qjoLb+DOkjIiO+1S2/rUFfz/9X0ecgCrNJJxt7rYpNtcbz4bUhkV3+hJYM6a4v6txgynCn27hbW/LAhkEhZUJANqpBRhgw1ARDQ4BsWgAAHEQFvmJp3gRyAJ1sBIV0YcBim66VsLr6L2rS6H3pL8APl26clqHVRGrod9+7tISkJI53k+e7PGKqChEe+RI36rQDaqQUAYQFLQAAFwYloDkhM5Wyh7ABgEB3wcBqA+KfqVUbeTv2XoE7jY5HJgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kAAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfCAwwCsWgB8u3TktQ6qI1dDvv3dpCUhJHO8nz3Z4xVQUIj3yJG/VcAIzum7Z4PaYlBTeFvKo6mdRJVSxaBZjYWdNcZV1Ty5TgQDUbO0AYZHTgAAFwYlvr2hM5WyjXgCAkCATQKCwGnF41FGVRt5O/ZegTuNjkcmAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAADiIC3zE07wI5AE62AkK6MOAxTddK2F19F7VpdD70l8QHDAhCAo9FLXpN/XQGa2gjZRdyWe0Fc0Q1vna1/UvV2K8rfD1oAIcAgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kALETqZS1AkoWcZ9pE5Mo63WVlsOKJfWQKLFG/s3DYh3+gAaAAAAADEwOTUxNTg2OACeQH0MCL8UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABvyYlq8EwZHRAAAAAAAAIAAAAAAALC24AfOr7B+9wHRF8yKXY1QVDD2tgXWyS0aakzhF8WbEGQR6TI4r5Y",
            "transaction_id": {
                "@type": "internal.transactionId",
                "lt": "50630341000001",
                "hash": "/PZphaovGJ1xCTklvEPzGszPvBaotdzWcon79et+Nvw="
            },
            "fee": "1640116",
            "storage_fee": "5716",
            "other_fee": "1634400",
            "in_msg": {
                "@type": "raw.message",
                "source": "EQAAOIgLfMTTvAjkATrYCQrow4DFN10rYXX0XtWl0PvSX5uk",
                "destination": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W",
                "value": "57320468",
                "fwd_fee": "526938",
                "ihr_fee": "0",
                "created_lt": "50630337000002",
                "body_hash": "vt02QoQHP7hw48TBJm8i1YII+Zx8kL/QfNVj79Kmt7w=",
                "msg_data": {
                    "@type": "msg.dataRaw",
                    "body": "te6cckEBAgEAZgABqA+KfqVUbeTv2XoE7jY5HJgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kAAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfCAwEAGgAAAAAxMDk1MTU4NjicCb0U",
                    "init_state": ""
                },
                "message": "D4p+pVRt5O/ZegTuNjkcmAHzNijAFciaXiVi8dGN1XrxElXQWLyLbRMfO9b9ZAfziQAADiIC3zE0\n7wI5AE62AkK6MOAxTddK2F19F7VpdD70l8ID\n"
            },
            "out_msgs": [
                {
                    "@type": "raw.message",
                    "source": "EQD5dunJah1URq6Hffu7SEpCSOd5PnuzxiqgoRHvkSN-q19W",
                    "destination": "EQCM7pu2eD2mJQU3hbyqOpnUSVUsWgWY2FnTXGVdU8uU4Ddb",
                    "value": "55686068",
                    "fwd_fee": "822940",
                    "ihr_fee": "0",
                    "created_lt": "50630341000002",
                    "body_hash": "Ycyf2S915TpjkcLaOH70Kse87Z1rZrF65nPLm/70Rms=",
                    "msg_data": {
                        "@type": "msg.dataRaw",
                        "body": "te6cckEBAgEAZgABpxeNRRlUbeTv2XoE7jY5HJgAAHEQFvmJp3gRyAJ1sBIV0YcBim66VsLr6L2rS6H3pL8AAA4iAt8xNO8COQBOtgJCujDgMU3XSthdfRe1aXQ+9JfEBwEAGgAAAAAxMDk1MTU4NjhoTgE0",
                        "init_state": "te6cckEBAwEAbgACATQBAghCAo9FLXpN/XQGa2gjZRdyWe0Fc0Q1vna1/UvV2K8rfD1oAIcAgB8zYowBXIml4lYvHRjdV68RJV0Fi8i20THzvW/WQH84kALETqZS1AkoWcZ9pE5Mo63WVlsOKJfWQKLFG/s3DYh3+vXib6g="
                    },
                    "message": "F41FGVRt5O/ZegTuNjkcmAAAcRAW+YmneBHIAnWwEhXRhwGKbrpWwuvovatLofekvwAADiIC3zE0\n7wI5AE62AkK6MOAxTddK2F19F7VpdD70l8QG\n"
                }
            ]
        }
    ]
}

getBlockTransactions

Retrieves transactions of a given block.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.
  • shard (integer; query; required): the block shard ID. Example: -9223372036854775808 for the masterchain.
  • seqno (integer; query; required): the sequence number of the block. Example: 39064985.
  • root_hash (string; query): the root hash of the block for which to request transactions.
  • file_hash (string; query): the file hash associated with the block.
  • after_lt (integer; query): the logical time (LT) marker after which to retrieve transactions.
  • after_hash (string; query): the hash of the last transaction from which to continue fetching additional transactions.
  • count (integer; query; default=40): max number of transactions to return.

Returns

Transactions from a specific block on the TON blockchain.

Request example

curl -X GET https://rpc.ankr.com/http/ton_api_v2/getBlockTransactions?workchain=-1&shard=-9223372036854775808&seqno=39064985

Response example

{
    "ok": true,
    "result": {
        "@type": "blocks.transactions",
        "id": {
            "@type": "ton.blockIdExt",
            "workchain": -1,
            "shard": "-9223372036854775808",
            "seqno": 39064985,
            "root_hash": "8txd0JPm3PHUMknZMybwYD8WlGT+nqOQjJ3pqmd22/s=",
            "file_hash": "jVToDU7mOXsUoHRntkmE6/hbA1AgrFMMeFcqlnwv75M="
        },
        "req_count": 40,
        "incomplete": false,
        "transactions": [
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:3333333333333333333333333333333333333333333333333333333333333333",
                "lt": "47805438000001",
                "hash": "oWXZAgtiaqG69JC90PhKUCu/czgLghQVqQGAhxIetMY="
            },
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:3333333333333333333333333333333333333333333333333333333333333333",
                "lt": "47805438000002",
                "hash": "gG/fp7ukb3YHhcqRqhARG24xuNncdgc7dT4aSWLhRCI="
            },
            {
                "@type": "blocks.shortTxId",
                "mode": 135,
                "account": "-1:5555555555555555555555555555555555555555555555555555555555555555",
                "lt": "47805438000003",
                "hash": "6p8ROuJ33hA6l7SrfhiXG1XB8YUNEnm05IElYQQCDek="
            }
        ],
        "@extra": "1731071592.980471:0:0.13996576074060574"
    }
}

getBlockTransactionsExt

Retrieves block transactions extended info.

Parameters


  • workchain (integer; query; required): the block workchain ID. Example: -1 for the masterchain.