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.
Mainnet Endpoint Links
JSON-RPC | https://api.chain-rpc.online/ton | |
REST API | https://api.chain-rpc.online/ton/${methodName} |
curl https://api.chain-rpc.online/ton/getConsensusBlock -H "X-API-Key: test"
JSON-RPC Example
All methods in the API are available through JSON-RPC 2.0 protocol.
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": "getConsensusBlock"
}'
References
REST API Documentation
Client SDK Documentation
TON Blockchain Documentation
Below is a categorized list of TON RPC methods, each essential for interacting with and retrieving data from the TON blockchain.
All RPCs use the HTTP GET method.
method | description |
---|---|
getMasterchainInfo | Get information about the masterchain |
getMasterchainBlockSignatures | Get up-to-date masterchain state |
getShardBlockProof | Get merkle proof of shardchain block |
getConsensusBlock | Get consensus block and its update timestamp |
lookupBlock | Look up block by either seqno, lt or unixtime |
shards | Get shards information |
getBlockTransactions | Get transactions of the given block |
getBlockTransactionsExt | Get transactions of the given block |
getBlockHeader | Get metadata of a given block |
getOutMsgQueueSizes | Get info with current sizes of messages queues by shards |
All RPCs use the HTTP GET method.
method | description |
---|---|
getAddressInformation | Get basic information about the address: balance, code, data, last_transaction_id |
getExtendedAddressInformation | 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 |
getWalletInformation | This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet |
getTransactions | Get transaction history of a given address |
getAddressBalance | Get balance (in nanotons) of a given address |
getAddressState | Get state of a given address. State can be either unitialized, active or frozen |
packAddress | Convert an address from raw to human-readable format |
unpackAddress | Convert an address from human-readable to raw format |
getTokenData | Get NFT or Jetton information |
detectAddress | Get all possible address forms |
All RPCs use the HTTP GET method.
method | description |
---|---|
getTransactions | Get transaction history of a given address |
getBlockTransactions | Get transactions of the given block |
getBlockTransactionsExt | Get transactions of the given block |
tryLocateTx | Locate outcoming transaction of destination address by incoming message |
tryLocateResultTx | Same as previous. Locate outcoming transaction of destination address by incoming message |
tryLocateSourceTx | Locate incoming transaction of source address by outcoming message |
All RPCs use the HTTP GET method.
method | description |
---|---|
getConfigParam | Get config by id |
getConfigAll | Get cell with full config |
method | description |
---|---|
runGetMethod (POST) | Run get method on smart contract |
All RPCs use the HTTP POST method.
method | description |
---|---|
sendBoc | Send serialized boc file: fully packed and serialized external message to blockchain |
sendBocReturnHash | Send serialized boc file: fully packed and serialized external message to blockchain. The method returns message hash |
sendQuery | Send 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 |
estimateFee | Estimate fees required for query processing. body, init-code and init-data accepted in serialized format (b64-encoded) |