Chain RPC

TON Node RPC

Access the TON RPC API to interact with the blockchain, send transactions, check balances, and retrieve blocks or other critical data. Simplify integration with fast and reliable connectivity to the TON network.

JSON-RPC Endpoint https://api.chain-rpc.online/ton/jsonRPC
REST API Endpoint https://api.chain-rpc.online/ton/${methodName}

Basically TON node provides several protocols for communicating with the TON blockchain network:

  • REST API over HTTPS
  • JSON-RPC over HTTPS
  • Abstract Datagram Network Layer (ADNL) - serves as a low-level communication protocol for transmitting data between nodes and is responsible for routing messages and transactions through the decentralized network. Its basic purpose is to allow nodes (network participants) to communicate directly with one another efficiently, securely, and anonymously. It operates primarily over UDP (IPv4, with future support for IPv6) and optionally falls back to TCP if UDP is unavailable.

curl REST API example

curl -G https://api.chain-rpc.online/ton/getAddressInformation \
  -H "x-api-key: test" \
  -d address=UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K

curl JSON-RPC example
All methods in the API are available through JSON-RPC 2.0 protocol.
Be aware that the TON Node API requires all parameters to be passed by name rather than as a positional list.

curl https://api.chain-rpc.online/ton/jsonRPC \
  -X POST -H "Content-Type: application/json" \
  -H "x-api-key: test" \
  -d '{ "jsonrpc": "2.0", "id": 1,
    "method": "getAddressInformation",
    "params": {
        "address": "UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K"
    }
}'

Refferences
TON node API doc
Client SDK
Blockchain doc


Below is a categorized list of TON RPC methods, each essential for interacting with and retrieving data from the TON blockchain.

Block

All RPCs use the HTTP GET method.

methoddescription
getMasterchainInfoGet information about the masterchain
getMasterchainBlockSignaturesGet up-to-date masterchain state
getShardBlockProofGet merkle proof of shardchain block
getConsensusBlockGet consensus block and its update timestamp
lookupBlockLook up block by either seqno, lt or unixtime
shardsGet shards information
getBlockTransactionsGet transactions of the given block
getBlockTransactionsExtGet transactions of the given block
getBlockHeaderGet metadata of a given block
getOutMsgQueueSizesGet info with current sizes of messages queues by shards

Account

All RPCs use the HTTP GET method.

methoddescription
getAddressInformationGet basic information about the address: balance, code, data, last_transaction_id
getExtendedAddressInformationSimilar 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
getWalletInformationThis method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet
getTransactionsGet transaction history of a given address
getAddressBalanceGet balance (in nanotons) of a given address
getAddressStateGet state of a given address. State can be either unitialized, active or frozen
packAddressConvert an address from raw to human-readable format
unpackAddressConvert an address from human-readable to raw format
getTokenDataGet NFT or Jetton information
detectAddressGet all possible address forms


Transaction

All RPCs use the HTTP GET method.

methoddescription
getTransactionsGet transaction history of a given address
getBlockTransactionsGet transactions of the given block
getBlockTransactionsExtGet transactions of the given block
tryLocateTxLocate outcoming transaction of destination address by incoming message
tryLocateResultTxSame as previous. Locate outcoming transaction of destination address by incoming message
tryLocateSourceTxLocate incoming transaction of source address by outcoming message


Blockchain Configuration

All RPCs use the HTTP GET method.

methoddescription
getConfigParamGet config by id
getConfigAllGet cell with full config

Run smart contract get method

methoddescription
runGetMethod (POST)Run get method on smart contract


Send data

All RPCs use the HTTP POST method.

methoddescription
sendBocSend serialized boc file: fully packed and serialized external message to blockchain
sendBocReturnHashSend serialized boc file: fully packed and serialized external message to blockchain. The method returns message hash
sendQuerySend query - unpacked external message. This method takes address, body and init-params (if any), packs it to external message and sends to network. All params should be boc-serialized
estimateFeeEstimate fees required for query processing. body, init-code and init-data accepted in serialized format (b64-encoded)

On this page