Supported Chains: S-T (4/4)
Supported chains S-T on the Web3 API platform. See the full chain list for every network.
TRON
Available for Premium users only.
TRON API is available on Web3 API platform.
TRON is an open source public blockchain platform that supports smart contracts. TRON is compatible with Ethereum, which means that you can migrate smart contracts on Ethereum to TRON directly or with minor modifications. TRON relies on a unique consensus mechanism to realize the high TPS of the TRON network that is far beyond Ethereum, bringing developers a good experience of a faster transaction.
Official quick links: Website, Docs, GitHub
Networks
- Mainnet
- REST API (
HTTPS) - JSON-RPC API (
HTTPS)
- REST API (
API methods
For TRON, we support blockchain interaction via all the applicable methods except for those listed as unsupported.
Unsupported
This section contains a list of methods we don't support for Premium service plan.
If you require any of the methods from the list, contact our Sales (sales@ankr.com) about moving to the Enterprise service plan that can provide the services tailored to your specific needs.
/wallet/easytransferbyprivate,
/wallet/easytransferassetbyprivate,
/wallet/easytransfer,
/wallet/easytransferasset,
/wallet/gettransactionsign,
And all the methods with the following segments in their path:
easytransferbyprivate,
easytransferassetbyprivate,
easytransfer,
easytransferasset,
gettransactionsign,
createaddress,
listnodes,
generateaddress,
getnodeinfo,
addtransactionsign,
getakfromask,
getnkfromnsk,
getspendingkey,
getexpandedspendingkey,
getdiversifier,
getincomingviewingkey,
createspendauthsig,
getnewshieldedaddress,
createshieldedtransaction,
createshieldedcontractparameters,
createshieldedcontractparameterswithoutask,
scanshieldedtrc20notesbyivk,
scanshieldedtrc20notesbyovk,
isshieldedtrc20contractnotespent
API querying
Request example (JSON-RPC)
curl -X POST https://rpc.ankr.com/tron_jsonrpc/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Response example (JSON-RPC)
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x30dc665"
}
Request example (REST)
curl -X GET 'https://rpc.ankr.com/premium-http/tron/{your_token}/walletsolidity/getnowblock'
Response example (REST)
{
"blockID": "0000000002fa7ad50ad1632efffc6f8376488681897834ac17bdf137e961b5f3",
"block_header": {
"raw_data": {
"number": 49969877,
"txTrieRoot": "9fb478348a2f48bd15eb5cff7d6b6a3845e7014a444125981e41c761c05c8898",
"witness_address": "411761716b76c6a3d885299c366826046c09b08d26",
"parentHash": "0000000002fa7ad442c90c1be8ab67467e1940017258cb28496bcafe7bcb1bbd",
"version": 27,
"timestamp": 1680522399000
},
"witness_signature": "50243f8d127f417f407e1df845c77bdf600d33d155cbcebe82b6b6903b8e74492c1bfabbf7be683ff0a20f9ce22565f9e6fe05c4202bb950e0390d4bbc38f7f301"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"8939604c6e12c894a5c45abca9337121f172281522227b51a78ddeaf3105c6a959378ef0d7541473ae15b28ee6c744525552577cac04d4ec0a48925e69a2f1ca00"
],
"txID": "e8a35f80078d8e7f562d7b19c91102388d400029f9454d90d4b638bf6094621e",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"data": "a9059cbb000000000000000000000000149e4be8e140208f5640814249406404f475fb1700000000000000000000000000000000000000000000000000000000097a25c0",
"owner_address": "41cebabc6a66da33d2135f11207d6ab88b82829813",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
},
"type_url": "type.googleapis.com/protocol.TriggerSmartContract"
},
"type": "TriggerSmartContract"
}
],
"ref_block_bytes": "7ac2",
"ref_block_hash": "182e27a1484a4f66",
"expiration": 1680533174894,
"fee_limit": 30000000,
"timestamp": 1680522374779
},
"raw_data_hex": "0a027ac22208182e27a1484a4f6640eef4d4bcf4305aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541cebabc6a66da33d2135f11207d6ab88b82829813121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244a9059cbb000000000000000000000000149e4be8e140208f5640814249406404f475fb1700000000000000000000000000000000000000000000000000000000097a25c070fbdcc1b7f43090018087a70e"
}
]
}