For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

TRON — SolidityNode API

API reference for TRON. All methods ->

SolidityNode API

/walletsolidity/getaccount

Retrieves account information.

Parameters

  • address (string; hex; required): a hex-encoded account address.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getaccount' \
-H 'Content-Type: application/json' \
-d '{
"address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"
}'

Response example

{
"account_name": "636363797979636363",
"address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"asset": [
{
"key": "TRX",
"value": 1
},
{
"key": "DEX",
"value": 0
},
{
"key": "Kitty",
"value": 0
},
{
"key": "SEED",
"value": 0
},
{
"key": "WIN",
"value": 0
},
{
"key": "Perogies",
"value": 0
},
{
"key": "TRXTestCoin",
"value": 0
}
]
}

walletsolidity/listwitnesses

Retrieves the list of witnesses.

Parameters

None.

Request example

curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/listwitnesses'

Response example

{
"witnesses": [
{
"address": "4100e9fdbd1d24ab56996bd37d76fb7b16dcf62ff1",
"voteCount": 1087436,
"url": "https://www.tronmacau.com"
},
{
"address": "41012f81bd368f632fb22b9ddfeb284155f1f04198",
"voteCount": 314,
"url": "https://firekraken.media"
},
{
"address": "4101c17562ee5a1ecb60f9ea6e49ef94ec0de99580",
"voteCount": 377,
"url": "https://tronpad.com"
},
{
"address": "41021957c4576cbeae8bdf0576248e3e486a4cf3fa",
"voteCount": 5,
"url": "HTTPS://BEFREE"
},
{
"address": "41022939a4a06cbc7b384096c1af8657ec435173af",
"voteCount": 1399832971,
"url": "antinvestmentgroup",
"totalProduced": 891304,
"totalMissed": 1119,
"latestBlockNum": 49885242,
"latestSlotNum": 560089475,
"isJobs": true
},
{
"address": "4102a0ed82a9609e7ea9155f00137dc3fce818033f",
"voteCount": 98954,
"url": "XREGlobal.com"
},
{
"address": "4102f95b2185f52ac539128b28033998ab01466986",
"voteCount": 114,
"url": "http://imcash.io"
},
{
"address": "41037e18c9ca44b2ba35f0bb7d0c075f252a191294",
"voteCount": 175114359,
"url": "https://trxultra.org",
"totalProduced": 1164492,
"totalMissed": 19127,
"latestBlockNum": 41857315,
"latestSlotNum": 552045590
}
]
}

/walletsolidity/getassetissuelist

Retrieves the list of all tokens.

Parameters

None.

Request example

curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getassetissuelist'

Response example

{
"assetIssue": [
{
"owner_address": "414d1ef8673f916debb7e2515a8f3ecaf2611034aa",
"name": "53454544",
"abbr": "53454544",
"total_supply": 100000000000,
"trx_num": 1000000,
"num": 1,
"start_time": 1529987043000,
"end_time": 1530342060000,
"description": "536573616d657365656420746f6b656e7320666f7220636f6d6d756e697479207265776172647320616e6420534545446765726d696e61746f7220696e766573746d656e74206f6620636f6d6d756e6974792d766f7465642070726f6a656374732e",
"url": "687474703a2f2f7777772e736573616d65736565642e6f7267",
"id": "1000001"
},
{
"owner_address": "410b53ce4aa6f0c2f3c849f11f682702ec99622e2e",
"name": "545258",
"abbr": "545258",
"total_supply": 99000000000,
"trx_num": 1000000,
"num": 1,
"start_time": 1529989896000,
"end_time": 1537632000000,
"description": "74726f6e546f6b656e",
"url": "68747470733a2f2f74726f6e2e6e6574776f726b",
"id": "1000002"
},
{
"owner_address": "41d13433f53fdf88820c2e530da7828ce15d6585cb",
"name": "49504653",
"abbr": "49504653",
"total_supply": 100000000000,
"trx_num": 1000000,
"num": 1,
"start_time": 1529990700000,
"end_time": 1537632000000,
"description": "4950465320636f696e",
"url": "687474703a2f2f",
"id": "1000003"
}
]
}

/walletsolidity/getpaginatedassetissuelist

Retrieves the list of all tokens by pagination.

Parameters

  • offset (integer; required): the index of the start token.
  • limit (integer; required): the amount of tokens per page.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getpaginatedassetissuelist' \
-H 'Content-Type: application/json' \
-d '{
"offset": 0,
"limit": 10
}'

Response example

{
"assetIssue": [
{
"owner_address": "416b1171698969a36e5eb2eb6ea7aa9204d5e10cfc",
"name": "21212121474f4c44434f494e",
"abbr": "474f4c44",
"total_supply": 9000000000000000000,
"trx_num": 1000000,
"num": 1000,
"start_time": 1556094180182,
"end_time": 1871799840182,
"description": "474f4c44",
"url": "68747470733a2f2f676f6c64636861696e2e78797a",
"id": "1002341"
},
{
"owner_address": "418f82a73b283c7bf8515fa3cc2c0399d4d593e2e3",
"name": "21212121476f6c6453706f7421212121",
"abbr": "476f6c64",
"total_supply": 99000000000,
"frozen_supply": [
{
"frozen_amount": 2000000000,
"frozen_days": 30
}
],
"trx_num": 1000000,
"num": 100,
"start_time": 1559106000646,
"end_time": 1609451940646,
"description": "476f6c6453706f7420666f6c6c6f7720746865207072696365206f6620676f6c6420696e2074686520626c6f636b636861696e212121204f776e6572732077696c6c2067657420414753202861476f6c6453706f74292064726f70206d6f6e74686c792e20476f6c6453706f742077696c6c20626520757067726164656420746f206120747263323020696e20323032302e20496e7665737420696e2074686520676f6c64206d61726b657421212120476c6f62616c20476f6c6420547261646572732121",
"url": "7777772e676f6c6473706f742e6575",
"id": "1002467"
},
{
"owner_address": "418225f3aa48a2d30643a64410abb1e914dfa0bd2f",
"name": "212121363636",
"abbr": "363636",
"total_supply": 666666666666666666,
"frozen_supply": [
{
"frozen_amount": 666666666,
"frozen_days": 30
}
],
"trx_num": 1000000,
"num": 666,
"start_time": 1558134600062,
"end_time": 1589755860062,
"description": "46756e6e79",
"url": "68747470733a2f7777772e736174616e2e696f",
"id": "1002438"
}
]
}

/walletsolidity/getassetissuebyname

Retrieves a token by token name.

Parameters

  • value (string; hex; required): a token name.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getassetissuebyname' \
-H 'Content-Type: application/json' \
-d '{
"value": "44756354616E"
}'

/walletsolidity/getassetissuelistbyname

Retrieves the list of tokens by name.

Parameters

  • value (string; hex; required): a token name.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getassetissuelistbyname' \
-H 'Content-Type: application/json' \
-d '{
"value": "44756354616E"
}'

/walletsolidity/getassetissuebyid

Retrieves a token by token ID.

Parameters

  • value (string; required): a token ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getassetissuebyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "1000001"
}'

Response example

{
"owner_address": "414d1ef8673f916debb7e2515a8f3ecaf2611034aa",
"name": "53454544",
"abbr": "53454544",
"total_supply": 100000000000,
"trx_num": 1000000,
"num": 1,
"start_time": 1529987043000,
"end_time": 1530342060000,
"description": "536573616d657365656420746f6b656e7320666f7220636f6d6d756e697479207265776172647320616e6420534545446765726d696e61746f7220696e766573746d656e74206f6620636f6d6d756e6974792d766f7465642070726f6a656374732e",
"url": "687474703a2f2f7777772e736573616d65736565642e6f7267",
"id": "1000001"
}

/walletsolidity/getnowblock

Retrieves the latest block information.

Parameters

None.

Request example

curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getnowblock'

Response example

{
"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"
}
]
}

/walletsolidity/getblockbynum

Retrieves a block information by block height.

Parameters

  • num (integer; required): block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getblockbynum' \
-H 'Content-Type: application/json' \
-d '{
"num": 49970163
}'

Response example

{
"blockID": "0000000002fa7bf3d33e148bbe2b498de606277c331d94432f07e449f76b3772",
"block_header": {
"raw_data": {
"number": 49970163,
"txTrieRoot": "cf8aa2f25d944b1f9ed76943447e5f628e583bc857fba96360eb57b00483a2c1",
"witness_address": "41beab998551416b02f6721129bb01b51fceceba08",
"parentHash": "0000000002fa7bf20d335ed60354f75054deab764811d0f461bb04970fb16318",
"version": 27,
"timestamp": 1680523263000
},
"witness_signature": "afd69d8ce7fc5418af3b090ee2e47ec57f072403bff6b60f51fa52bd4c27647b6f488a3aeaea140776d7cf35d4bb10570067b3155f069ab67591d6394f91d41000"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"a08d1900639be505601be4d2187957abf8f21c9e650c56e8d863aa3392bdfae646069b56e963dcb4da6c9408103e24a0a517db34c62b7ff8ea30db2eda51c0ef00"
],
"txID": "9c22bdf305f1cebc2bebbdfa854ec1cf1bea5dd9e6fd7dca408d871b993f6b10",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 5,
"owner_address": "41e6443f26ecd0595895ec12a581e1f5775a6776ae",
"to_address": "4179715c1c95034e146ac451363f8aa68a8ccdb462"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "7bdf",
"ref_block_hash": "dfaa0a7cf8e86900",
"expiration": 1680523317000,
"timestamp": 1680523259702
},
"raw_data_hex": "0a027bdf2208dfaa0a7cf8e8690040889efbb7f4305a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a1541e6443f26ecd0595895ec12a581e1f5775a6776ae12154179715c1c95034e146ac451363f8aa68a8ccdb462180570b6def7b7f430"
}
]
}

/walletsolidity/gettransactionbyid

Retrieves transaction information by transaction ID.

Parameters

  • value (string; required): a transaction ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/gettransactionbyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "041ad82f1aa2628441c4aff5eb6052fb5010d8610dc87927ccc4f66c992373da"
}'

Response example

{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"2caaa0c1dfd6e6ec87c6a00ade1fb287047737759b0aaba56bc03af7a9204f2b5f3deecbb58b3b8f66fe2fe6a1fc6c9d720ee7827c04bd67f450f4a094a31f2901"
],
"txID": "041ad82f1aa2628441c4aff5eb6052fb5010d8610dc87927ccc4f66c992373da",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 5,
"owner_address": "415da7530953c34dfe4581d088e1d5bec80b295960",
"to_address": "41ea46e0b8c0bf2d8400941188db659b7fb69ab4f4"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "7dab",
"ref_block_hash": "3eb7d8144eff0a3f",
"expiration": 1680524697000,
"timestamp": 1680524638448
},
"raw_data_hex": "0a027dab22083eb7d8144eff0a3f40a8bbcfb8f4305a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a15415da7530953c34dfe4581d088e1d5bec80b295960121541ea46e0b8c0bf2d8400941188db659b7fb69ab4f4180570f0f1cbb8f430"
}

/walletsolidity/gettransactioncountbyblocknum

Retrieves the number of transactions in a specific block.

Parameters

  • num (integer; required): block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/gettransactioncountbyblocknum' \
-H 'Content-Type: application/json' \
-d '{
"num": 49970622
}'

Response example

{
"count": 277
}

/walletsolidity/gettransactioninfobyblocknum

Retrieves the list of transaction information in a specific block.

Parameters

  • num (integer; required): block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/gettransactioninfobyblocknum' \
-H 'Content-Type: application/json' \
-d '{
"num": 49970749
}'

Response example

[
{
"log": [
{
"address": "a614f803b6fd780986a42c78ec9c7f77e6ded13c",
"data": "00000000000000000000000000000000000000000000000000000000603d7380",
"topics": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"000000000000000000000000f49dfc8143deb347b7724aef0e1f5d3c22a0035f",
"000000000000000000000000a05367c1538d48e2491ba3094c2e68b2e076284c"
]
}
],
"blockNumber": 49970749,
"contractResult": [
"0000000000000000000000000000000000000000000000000000000000000000"
],
"blockTimeStamp": 1680525021000,
"receipt": {
"result": "SUCCESS",
"energy_penalty_total": 17245,
"energy_usage": 31895,
"energy_usage_total": 31895,
"net_usage": 345
},
"id": "578bd80976b42a50468c400fa59d6472295bb740a9d7ce3667616fa40d7f090b",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
},
{
"blockNumber": 49970749,
"contractResult": [
""
],
"blockTimeStamp": 1680525021000,
"receipt": {
"net_usage": 269
},
"id": "110d40b1ab398933dd0981b6dfffc634c3e7b04b2c2b14c889979f009f5b5c11"
}
]

/walletsolidity/gettransactioninfobyid

Retrieves the transaction fee and block height by transaction ID.

Parameters

  • value (string; required): a transaction ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/gettransactioninfobyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "4267b26e1b8ef4d105bc86184df10fbdeafec64964ea18878e61bde8a27481e0"
}'

Response example

{
"id": "4267b26e1b8ef4d105bc86184df10fbdeafec64964ea18878e61bde8a27481e0",
"blockNumber": 49971209,
"blockTimeStamp": 1680526401000,
"contractResult": [
""
],
"receipt": {
"net_usage": 268
}
}

/walletsolidity/getdelegatedresource

Retrieves the energy delegation information.

Parameters

  • fromAddress (string; hex; required): a sender address.
  • toAddress (string; hex; required): a receiver address.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getdelegatedresource' \
-H 'Content-Type: application/json' \
-d '{
"fromAddress": "41ca6a85e52ddf7ea4b52ead38b479180b2d6347af",
"toAddress": "41085ae1e02fae8af2b83a5c4c4d0f6246d3b5821e"
}'

Response example

{
"delegatedResource": [
{
"from": "41ca6a85e52ddf7ea4b52ead38b479180b2d6347af",
"to": "41085ae1e02fae8af2b83a5c4c4d0f6246d3b5821e",
"frozen_balance_for_energy": 1883000000,
"expire_time_for_energy": 1680786519000
}
]
}

/walletsolidity/getdelegatedresourceaccountindex

Retrieves the energy delegation index by an account.

Parameters

  • value (string; hex; required): an address.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getdelegatedresourceaccountindex' \
-H 'Content-Type: application/json' \
-d '{
"value": "419844f7600e018fd0d710e2145351d607b3316ce9"
}'

/walletsolidity/getexchangebyid

Retrieves an exchange pair by exchange pair ID.

Parameters

  • id (integer; required): an exchange pair ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getexchangebyid' \
-H 'Content-Type: application/json' \
-d '{
"id": 1
}'

Response example

{
"exchange_id": 1,
"creator_address": "41f596e85bfd042744f76880979a133da0728679d9",
"create_time": 1539673398000,
"first_token_id": "31303030353634",
"first_token_balance": 5,
"second_token_id": "5f",
"second_token_balance": 4326459
}

/walletsolidity/listexchanges

Retrieves the list of all exchange pairs.

Parameters

None.

Request example

curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/listexchanges'

Response example

{
"exchanges": [
{
"exchange_id": 184,
"creator_address": "4165b29b92cb5f33342647c4cc32b6efcb59eb3f45",
"create_time": 1615538445000,
"first_token_id": "31303033333934",
"first_token_balance": 100000000000000,
"second_token_id": "31303032393232",
"second_token_balance": 1341470000000
},
{
"exchange_id": 183,
"creator_address": "41f55075d3c88b65d65e0f4cb19881182adce446b8",
"create_time": 1602234009000,
"first_token_id": "31303032373537",
"second_token_id": "5f"
},
{
"exchange_id": 182,
"creator_address": "41d4af469119bab46909222e77e277c655f0de9054",
"create_time": 1600277286000,
"first_token_id": "31303033333031",
"first_token_balance": 115545377,
"second_token_id": "31303032303030",
"second_token_balance": 86546095
},
{
"exchange_id": 181,
"creator_address": "41d4af469119bab46909222e77e277c655f0de9054",
"create_time": 1600208667000,
"first_token_id": "5f",
"first_token_balance": 37777779,
"second_token_id": "31303033333031",
"second_token_balance": 66176472
}
]
}

/walletsolidity/getaccountbyid

Retrieves an account information by account ID.

Parameters

  • account_id (string; hex; required): an account ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getaccountbyid' \
-H 'Content-Type: application/json' \
-d '{
"account_id": "41712d3993327b916c33eea0c3e8ea3eab592e88da"
}'

/walletsolidity/getblockbyid

Retrieves block information by block ID.

Parameters

  • value (string; required): a block ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getblockbyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "0000000002fa856df555c6441cf755a551b131a5ca8d84f116dc59c042ef18fa"
}'

Response example

{
"blockID": "0000000002fa856df555c6441cf755a551b131a5ca8d84f116dc59c042ef18fa",
"block_header": {
"raw_data": {
"number": 49972589,
"txTrieRoot": "354bd442f2111081081826ae638a0d07422609aeea8dc63c3ad208088525567e",
"witness_address": "41022939a4a06cbc7b384096c1af8657ec435173af",
"parentHash": "0000000002fa856c18e27615c5ea553ff7c8318059b555801f329e9533dec810",
"version": 27,
"timestamp": 1680530541000
},
"witness_signature": "aad4536d655327bcb64a0046f69fc2fa5be5dfc2f76e391736c1bf7e0a96c08c0498a3b5aae821360ffa2a2b1797731a06e02fa9fd314a3d3c23a4eda0301fe501"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"c3c631c6d079838166807e67dbf2c734dec6f30cd981066c44758dcd1f4fe1e835d035e7f60501ea9bf42fdd0a54f8592771714c66a4f2a581c2b3d7c3f9d43f01"
],
"txID": "eb337d551043fc90e2f3cbd4ad8a2a61f0e3496e0662114628f0f2ff8a231bb0",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"data": "a9059cbb000000000000000000000000b034574a3a36a2e8c77d7d187facf91b8c3dd80300000000000000000000000000000000000000000000000000000000177bf680",
"owner_address": "418695dfd9b3e39cb574fa3893372fa3c6e329320c",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
},
"type_url": "type.googleapis.com/protocol.TriggerSmartContract"
},
"type": "TriggerSmartContract"
}
],
"ref_block_bytes": "8559",
"ref_block_hash": "537fd1c2c65c4c31",
"expiration": 1680530795000,
"fee_limit": 100000000,
"timestamp": 1680530537504
},
"raw_data_hex": "0a0285592208537fd1c2c65c4c3140f8d3c3bbf4305aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a15418695dfd9b3e39cb574fa3893372fa3c6e329320c121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244a9059cbb000000000000000000000000b034574a3a36a2e8c77d7d187facf91b8c3dd80300000000000000000000000000000000000000000000000000000000177bf68070a0f8b3bbf430900180c2d72f"
}
]
}

/walletsolidity/getblockbylimitnext

Retrieves a list of blocks by range.

Parameters

  • startNum (integer; required): the block height to start from (included in the range).
  • endNum (integer; required): the block height to end with (excluded from the range).

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getblockbylimitnext' \
-H 'Content-Type: application/json' \
-d '{
"startNum": 1,
"endNum": 2
}'

Response example

{
"block": [
{
"blockID": "00000000000000010ff5414c5cfbe9eae982e8cef7eb2399a39118e1206c8247",
"block_header": {
"raw_data": {
"number": 1,
"txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000",
"witness_address": "415095d4f4d26ebc672ca12fc0e3a48d6ce3b169d2",
"parentHash": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc",
"timestamp": 1529891469000
},
"witness_signature": "4544a6004c76286a1d6248f451bf148345a51e21881e84899758468da7b1c7e85b809735a1b2be29f166cfba8c5e69543f4f24294fbfa0498a39002166a397ba00"
}
}
]
}

/walletsolidity/getblockbylatestnum

Retrieves several latest blocks.

Parameters

  • num (integer; required): the number of blocks to return.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getblockbylatestnum' \
-H 'Content-Type: application/json' \
-d '{
"num": 1
}'

Response example

{
"block": [
{
"blockID": "0000000002fa889448bff265ae132d3ce3a61c02f5f2f3a8307df772014e2f66",
"block_header": {
"raw_data": {
"number": 49973396,
"txTrieRoot": "1c530d753117305b7ffdca38f6087dc4f5f2cf3f18f46f03f9353be6df733f32",
"witness_address": "418440ffd578f7a5abf3537b5f46a6980d382db581",
"parentHash": "0000000002fa88938e671ca492f416843f3d8e69ec12f0750955f72cf11604f1",
"version": 27,
"timestamp": 1680532962000
},
"witness_signature": "f2d71f8b28afc21f71c5a2e80a815cfe6f7cc6f56f8059cbb3d0dfed6ad36826299956284650041ca06aaae7f45657f2e2ed8363b9a6eb999d6c6207fa7a830400"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"f072741d74c3d637b7f2070be99a8362383e119e08f00db5de31d025fee4cf817cc9f5551479bfb0ad9cf056cb76a76192ddd293ea67096aa94cb129cdc455be01"
],
"txID": "929a0c3976c4fc26b3b8a5d922ec5fc1bf3685a0cd7e303d50d3c394120e1ffb",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"data": "a9059cbb00000000000000000000004133751dd8f732e5c0f7c32eb247b524cb3f0b17b0000000000000000000000000000000000000000000000000000000000606f800",
"owner_address": "41d1c4bb7b2f39aba5707711719b2236b5b605af2e",
"contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
},
"type_url": "type.googleapis.com/protocol.TriggerSmartContract"
},
"type": "TriggerSmartContract"
}
],
"ref_block_bytes": "8880",
"ref_block_hash": "24c789571ad256f0",
"expiration": 1680533018597,
"fee_limit": 30000000,
"timestamp": 1680532902000
},
"raw_data_hex": "0a028880220824c789571ad256f040e5afcbbcf4305aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541d1c4bb7b2f39aba5707711719b2236b5b605af2e121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244a9059cbb00000000000000000000004133751dd8f732e5c0f7c32eb247b524cb3f0b17b0000000000000000000000000000000000000000000000000000000000606f80070f0a0c4bcf43090018087a70e"
}
]
}
]
}

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getdeferredtransactionbyid' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getdeferredtransactioninfobyid' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/getmerkletreevoucherinfo' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/scannotebyivk' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/scanandmarknotebyivk' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/scannotebyovk' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/isspend' )

//: # (-H 'Content-Type: application/json' )

//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/walletsolidity/scanshieldedtrc20notesbyivk' )

//: # (-H 'Content-Type: application/json' )

FullNode API:

wallet/createtransaction

Creates a transfer transaction.

If to_address doesn't exist, creates an account on the blockchain.

Parameters

  • to_address (string; hex; required): a destination address.
  • owner_address (string; hex; required): a sender address.
  • amount (integer; required): a transfer amount.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createtransaction' \
-H 'Content-Type: application/json' \
-d '{
"to_address": "41e9d79cc47518930bc322d9bf7cddd260a0260a8d",
"owner_address": "41D1E7A6BC354106CB410E65FF8B181C600FF14292",
"amount": 1000
}'

wallet/broadcasttransaction

Broadcasts a transaction after signing.

Parameters

A transaction after signing, containing signature, txID, raw_data

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/broadcasttransaction' \
-H 'Content-Type: application/json' \
-d '{
"signature": [
"97c825b41c77de2a8bd65b3df55cd4c0df59c307c0187e42321dcc1cc455ddba583dd9502e17cfec5945b34cad0511985a6165999092a6dec84c2bdd97e649fc01"
],
"txID": "454f156bf1256587ff6ccdbc56e64ad0c51e4f8efea5490dcbc720ee606bc7b8",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 1000,
"owner_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"to_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "267e",
"ref_block_hash": "9a447d222e8de9f2",
"expiration": 1530893064000,
"timestamp": 1530893006233
}
}'

wallet/broadcasthex

Broadcasts a transaction hex string after signing.

Parameters

  • transaction (string; hex; required): a transaction hex after signing.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/broadcasthex' \
-H 'Content-Type: application/json' \
-d '{
"transaction": "0A8A010A0202DB2208C89D4811359A28004098A4E0A6B52D5A730802126F0A32747970652E676F6F676C65617069732E636F6D2F70726F746F636F6C2E5472616E736665724173736574436F6E747261637412390A07313030303030311215415A523B449890854C8FC460AB602DF9F31FE4293F1A15416B0580DA195542DDABE288FEC436C7D5AF769D24206412418BF3F2E492ED443607910EA9EF0A7EF79728DAAAAC0EE2BA6CB87DA38366DF9AC4ADE54B2912C1DEB0EE6666B86A07A6C7DF68F1F9DA171EEE6A370B3CA9CBBB00"
}'

Response example

{
"result": false,
"code": "SIGERROR",
"txid": "38a0482d6d5a7d1439a50b848d68cafa7d904db48b82344f28765067a5773e1d",
"message": "Validate signature error: 8bf3f2e492ed443607910ea9ef0a7ef79728daaaac0ee2ba6cb87da38366df9ac4ade54b2912c1deb0ee6666b86a07a6c7df68f1f9da171eee6a370b3ca9cbbb00 is signed by TJCnKsPa7y5okkXvQAidZBzqx3QyQ6sxMW but it is not contained of permission.",
"transaction": "{\"raw_data\": {\"ref_block_bytes\": \"02db\",\"ref_block_hash\": \"c89d4811359a2800\",\"expiration\": 1560496575000,\"contract\": [{\"type\": \"TransferAssetContract\",\"parameter\": {\"type_url\": \"type.googleapis.com/protocol.TransferAssetContract\",\"value\": \"0a07313030303030311215415a523b449890854c8fc460ab602df9f31fe4293f1a15416b0580da195542ddabe288fec436c7d5af769d242064\"}}]},\"signature\": [\"8bf3f2e492ed443607910ea9ef0a7ef79728daaaac0ee2ba6cb87da38366df9ac4ade54b2912c1deb0ee6666b86a07a6c7df68f1f9da171eee6a370b3ca9cbbb00\"]}"
}

wallet/updateaccount

Updates the name of an account.

Parameters

  • account_name (string; hex; required): an account name.
  • owner_address (string; hex; required): an owner address.
  • permission_id (string; optional): for multi-sig use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/updateaccount' \
-H 'Content-Type: application/json' \
-d '{
"account_name": "0x7570646174654e616d6531353330383933343635353139",
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292"
}'

Response example

{
"visible": false,
"txID": "5814a0c0b25f3cc8926f56b4742f4b7b32979f7c6c2dc240fcfd7bc3061de3a5",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"account_name": "7570646174654e616d6531353330383933343635353139",
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292"
},
"type_url": "type.googleapis.com/protocol.AccountUpdateContract"
},
"type": "AccountUpdateContract"
}
],
"ref_block_bytes": "cd8f",
"ref_block_hash": "4441a3e65f66075c",
"expiration": 1680586065000,
"timestamp": 1680586007964
},
"raw_data_hex": "0a02cd8f22084441a3e65f66075c40e888f1d5f4305a6a080a12660a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e74557064617465436f6e747261637412300a177570646174654e616d6531353330383933343635353139121541d1e7a6bc354106cb410e65ff8b181c600ff14292709ccbedd5f430"
}

wallet/votewitnessaccount

Votes for witnesses.

Parameters

  • owner_address (string; hex; required): an owner address.
  • votes (array of key-value pairs): your votes description.
    • vote_address (string; hex; required): the address of the witness you want to vote for.
    • vote_count (integer; required): the number of votes you'd like to give.
  • permission_id (integer; optional): for multi-sig use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/votewitnessaccount' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
"votes": [
{
"vote_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"vote_count": 5
}
]
}'

wallet/getBrokerage

Retrieves the ratio of brokerage of the witness.

Parameters

  • address (string; hex; required): the address of the witness's account.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getBrokerage' \
-H 'Content-Type: application/json' \
-d '{
"address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"
}'

Response example

{
"brokerage": 20
}

wallet/getReward

Retrieves unclaimed reward.

Parameters

  • address (string; hex; required): the address of the voter's account.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getReward' \
-H 'Content-Type: application/json' \
-d '{
"address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"
}'

Response example

{
"reward": 0
}

wallet/updateBrokerage

Updates the ratio of brokerage.

Parameters

  • owner_address (string; hex; required): the address of the witness's account.
  • brokerage (integer; required): the ration of the brokerage you'd like to update to.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/updateBrokerage' \
-H 'Content-Type: application/json' \
-d '{
"owner_address":"41E552F6487585C2B58BC2C9BB4492BC1F17132CD0",
"brokerage":30
}'

wallet/getaccountbalance

Retrieves the account balance in a specific block.

Parameters

  • account_identifier (required): an identifier of the account:
    • address (string; hex; required): an account address.
  • block_identifier (required): an identifier of the block:
    • hash (string; hex; required): a block hash.
    • number (integer): a block number.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getaccountbalance' \
-H 'Content-Type: application/json' \
-d '{
"account_identifier": {
"address": "TLLM21wteSPs4hKjbxgmH1L6poyMjeTbHm"
},
"block_identifier": {
"hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9",
"number": 68682
},
"visible": true
}'

Response example

{
"balance": 0,
"block_identifier": {
"hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9",
"number": 68682
}
}

wallet/createassetissue

Issues a token.

Parameters

  • owner_address (string; hex; required): an owner address.
  • name (string; hex; required): a token name.
  • abbr (string; hex; required): a token name abbreviation.
  • total_supply (integer; required): token total supply.
  • trx_num (integer; required): defines the price by the ratio of trx_num/num.
  • num (integer; required): defines the price by the ratio of trx_num/num.
  • start_time (integer; required): ICO start time.
  • end_time (integer; required): ICO end time.
  • description (string; hex; required): a token description.
  • url (string; hex; required): a token's official website URL.
  • free_asset_net_limit (integer; required): a token's free asset net limit.
  • public_free_asset_net_limit (integer; required): a token's public asset net limit.
  • frozen_supply (object: required): token staked supply:
    • frozen_amount (integer; required): the amount staked.
    • frozen_days (integer; required): the number of days.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createassetissue' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"name": "0x6173736574497373756531353330383934333132313538",
"abbr": "0x6162627231353330383934333132313538",
"total_supply": 4321,
"trx_num": 1,
"num": 1,
"start_time": 1530894315158,
"end_time": 1533894312158,
"description": "007570646174654e616d6531353330363038383733343633",
"url": "007570646174654e616d6531353330363038383733343633",
"free_asset_net_limit": 10000,
"public_free_asset_net_limit": 10000,
"frozen_supply": {
"frozen_amount": 1,
"frozen_days": 2
}
}'

wallet/updatewitness

Updates the witness's website URL.

Parameters

  • owner_address (string; hex; required): an owner address.
  • update_url (string; hex; required): a website URL.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/updatewitness' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
"update_url": "007570646174654e616d6531353330363038383733343633"
}'

wallet/createaccount

Creates an account.

Parameters

  • owner_address (string; hex; required): an owner address.
  • account_address (string; hex; required): a new address.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createaccount' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
"account_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0"
}'

wallet/createwitness

Applies to become a witness.

Parameters

  • owner_address (string; hex; required): an owner address.
  • url (string; hex; required): a website URL.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createwitness' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
"url": "007570646174654e616d6531353330363038383733343633"
}'

wallet/transferasset

Transfers a token.

Parameters

  • owner_address (string; hex; required): an owner address.
  • to_address (string; hex; required): a destination address.
  • asset_name (string; hex; required): a token ID.
  • amount (integer; required): a token transfer amount.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/transferasset' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41d1e7a6bc354106cb410e65ff8b181c600ff14292",
"to_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"asset_name": "31303030303031",
"amount": 100
}'

wallet/participateassetissue

Participates a token.

Returns a transaction object.

Parameters

  • to_address (string; hex; required): the issuer address of the token.
  • owner_address (string; hex; required): the participant address.
  • amount (integer; required): a participate token amount.
  • asset_name (string; hex; required): a token ID.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/participateassetissue' \
-H 'Content-Type: application/json' \
-d '{
"to_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0",
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1",
"amount": 100,
"asset_name": "3230313271756265696a696e67"
}'

wallet/freezebalance

Stakes TRX.

Parameters

  • owner_address (string; hex; required): an owner address.
  • frozen_balance (integer; required): a TRX stake amount.
  • frozen_duration (integer; required): TRX stake duration, at least 3 days.
  • resource (string; required): TRX stake type (BANDWIDTH/ENERGY).
  • receiver_address (string; hex; required): the address to receive the resource.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/freezebalance' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1",
"frozen_balance": 10000,
"frozen_duration": 3,
"resource": "BANDWIDTH",
"receiver_address": "414332f387585c2b58bc2c9bb4492bc1f17342cd1"
}'

wallet/unfreezebalance

Unstakes the staked TRX that is due.

Parameters

  • owner_address (string; hex; required): an owner address.
  • resource (string; required): staked TRX unstake type (BANDWIDTH/ENERGY).
  • receiver_address (string; hex; required): the address to lose the resource.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/unfreezebalance' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1",
"resource": "BANDWIDTH",
"receiver_address": "414332f387585c2b58bc2c9bb4492bc1f17342cd1"
}'

wallet/unfreezeasset

Unstakes the staked token that is due.

Parameters

  • owner_address (string; hex; required): an owner address.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/unfreezeasset' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1"
}'

wallet/withdrawbalance

Withdraws a reward to an account balance for witnesses.

Parameters

  • owner_address (string; hex; required): an owner address.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/withdrawbalance' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1"
}'

wallet/updateasset

Updates token information.

Parameters

  • owner_address (string; hex; required): an owner address.
  • description (string; hex; required): a token description.
  • url (string; hex): the token's website URL.
  • new_limit (integer; required): each token holder's free bandwidth.
  • new_public_limit (integer; required): the total free bandwidth of the token.
  • permission_id (string; optional): for multi-signature use.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/updateasset' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "41e472f387585c2b58bc2c9bb4492bc1f17342cd1",
"description": "",
"url": "",
"new_limit": 1000000,
"new_public_limit": 100
}'

wallet/getassetissuebyaccount

Retrieves the token issue information of an account.

Parameters

  • address (string; hex; required): a token issuer's address.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getassetissuebyaccount' \
-H 'Content-Type: application/json' \
-d '{
"address": "41F9395ED64A6E1D4ED37CD17C75A1D247223CAF2D"
}'

wallet/getaccountnet

Retrieves the bandwidth information of an account.

Parameters

  • address (string; hex; required): an account address.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getaccountnet' \
-H 'Content-Type: application/json' \
-d '{
"address": "4112E621D5577311998708F4D7B9F71F86DAE138B5"
}'

Response example

{
"freeNetLimit": 1500,
"assetNetUsed": [
{
"key": "1000532",
"value": 0
},
{
"key": "1002962",
"value": 0
},
{
"key": "1002775",
"value": 0
},
{
"key": "1002573",
"value": 0
},
{
"key": "1003049",
"value": 0
},
{
"key": "1001871",
"value": 0
},
{
"key": "1002927",
"value": 0
},
{
"key": "1002636",
"value": 0
}
],
"assetNetLimit": [
{
"key": "1000532",
"value": 0
},
{
"key": "1002962",
"value": 0
}
],
"TotalNetLimit": 43200000000,
"TotalNetWeight": 39127812682
}

wallet/getassetissuebyname

Retrieves a token by token name.

If the token name you query is not unique, this api will return an error.

Parameters

  • value (string; hex; required): a token name.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getassetissuebyname' \
-H 'Content-Type: application/json' \
-d '{
"value": "44756354616E"
}'

wallet/getassetissuelistbyname

Retrieves the list of tokens by name.

Parameters

  • value (string; hex; required): a token name.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getassetissuelistbyname' \
-H 'Content-Type: application/json' \
-d '{
"value": "44756354616E"
}'

wallet/getassetissuebyid

Retrieves a token by token ID.

Parameters

  • value (string; hex; required): a token ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getassetissuebyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "1000001"
}'

Response example

{
"owner_address": "414d1ef8673f916debb7e2515a8f3ecaf2611034aa",
"name": "53454544",
"abbr": "53454544",
"total_supply": 100000000000,
"trx_num": 1000000,
"num": 1,
"start_time": 1529987043000,
"end_time": 1530342060000,
"description": "536573616d657365656420746f6b656e7320666f7220636f6d6d756e697479207265776172647320616e6420534545446765726d696e61746f7220696e766573746d656e74206f6620636f6d6d756e6974792d766f7465642070726f6a656374732e",
"url": "687474703a2f2f7777772e736573616d65736565642e6f7267",
"id": "1000001"
}

wallet/getnowblock

Retrieves the latest block information.

Parameters

None.

Request example

curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getnowblock'

Response example

{
"blockID": "0000000002fae045b2c5caae3229fa17f2b9b00c603d19f535581f1ae934d63c",
"block_header": {
"raw_data": {
"number": 49995845,
"txTrieRoot": "3c06f5e0afe80d8eebf9bc4c019df67c72a4be68d609f69dc1d14147b7aabe02",
"witness_address": "41d376d829440505ea13c9d1c455317d51b62e4ab6",
"parentHash": "0000000002fae044905f37c65c913d5eac3ceaed495131f13aa657f7f336efe2",
"version": 27,
"timestamp": 1680600327000
},
"witness_signature": "01f4d3e47766bd5f763cf53520b0832add1743560a11e43ad1f4f9b1478f494b6c731d5e53096922c00fc5398fbbc68e77e9b5087d064bb33fa1d8685a35bba201"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"af028c602ab25e6b701ce5266810d6353e6d7642cf6eb3630554b9e3c09da1e5763f386cc91b726f9fcbbe0a356ba295902397fb9e1d99079be816c2a9775cc701"
],
"txID": "a0f90e85c0969407e8a02a8c25fd752e6a84c42230f05c71f0d07d23be68102d",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 2500000000,
"owner_address": "4159f33c7dcdfb016f14e38f28a3e6ece9ade61c3a",
"to_address": "4158c708263724a4b52701f80f63a0c314153317ed"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "e030",
"ref_block_hash": "b977ba00ada6335d",
"expiration": 1680600499747,
"timestamp": 1680600319747
},
"raw_data_hex": "0a02e0302208b977ba00ada6335d40a38ce2dcf4305a69080112650a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412340a154159f33c7dcdfb016f14e38f28a3e6ece9ade61c3a12154158c708263724a4b52701f80f63a0c314153317ed1880f28ba80970838ed7dcf430"
}
]
}

wallet/getblockbynum

Retrieves block information by block height.

Parameters

  • num (integer; required): a block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getblockbynum' \
-H 'Content-Type: application/json' \
-d '{
"num": 1
}'

Response example

{
"blockID": "00000000000000010ff5414c5cfbe9eae982e8cef7eb2399a39118e1206c8247",
"block_header": {
"raw_data": {
"number": 1,
"txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000",
"witness_address": "415095d4f4d26ebc672ca12fc0e3a48d6ce3b169d2",
"parentHash": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc",
"timestamp": 1529891469000
},
"witness_signature": "4544a6004c76286a1d6248f451bf148345a51e21881e84899758468da7b1c7e85b809735a1b2be29f166cfba8c5e69543f4f24294fbfa0498a39002166a397ba00"
}
}

wallet/getblockbyid

Retrieves a block information by block ID.

Parameters

  • value (string; hex; required): a block ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getblockbyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "0000000002fac94622cce188d5cf0fe3e7d9c27e5a01bdf9356b7ef35eeab160"
}'

Response example

{
"blockID": "0000000002fac94622cce188d5cf0fe3e7d9c27e5a01bdf9356b7ef35eeab160",
"block_header": {
"raw_data": {
"number": 49989958,
"txTrieRoot": "05f50bb51b90efe53d2d9c6df915c679df083d34c30055a2fc87419980f246f6",
"witness_address": "4178c842ee63b253f8f0d2955bbc582c661a078c9d",
"parentHash": "0000000002fac9457ebb855883515d42995029edb217a405aa47aadd8252b6d1",
"version": 27,
"timestamp": 1680582660000
},
"witness_signature": "b973f3bfd45138beffbdcad06277886ade7941eefec2aebf5dc8061547c5846255dcb4b2316839b33f574ffe2c301d04c2c27f12a941faf3747b8c2dca325c1f01"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"76b8a945442917034f7cfb2f6eed70c3f4e37f1ca396221bea0edf991cef8c8c7d8b93c944e6da2f76a4550d25eb64ffecb49b7617fc166398d566dfe9b1e80800"
],
"txID": "4caa8909391afd3dfb28a3d332e735f3cdcddf1d4081ede54f82d9de208a85b9",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 300000000,
"owner_address": "413c6120b82a61d0e0bb0c4d4ebfae56cb664ba5a6",
"to_address": "411ba55baf1e61fa22907822730ebfe7a5cf573ad5"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "c932",
"ref_block_hash": "6a781a380ccdd036",
"expiration": 1680582714000,
"timestamp": 1680582656449
},
"raw_data_hex": "0a02c93222086a781a380ccdd0364090c5a4d4f4305a69080112650a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412340a15413c6120b82a61d0e0bb0c4d4ebfae56cb664ba5a61215411ba55baf1e61fa22907822730ebfe7a5cf573ad51880c6868f0170c183a1d4f430"
}
]
}

wallet/getblockbylimitnext

Retrieves a list of blocks by range.

Parameters

  • startNum (integer; required): the block height to start with (included in the range).
  • endNum (integer; required): the block height to end by (excluded from the range)

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getblockbylimitnext' \
-H 'Content-Type: application/json' \
-d '{
"startNum": 1,
"endNum": 2
}'

Response example

{
"block": [
{
"blockID": "00000000000000010ff5414c5cfbe9eae982e8cef7eb2399a39118e1206c8247",
"block_header": {
"raw_data": {
"number": 1,
"txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000",
"witness_address": "415095d4f4d26ebc672ca12fc0e3a48d6ce3b169d2",
"parentHash": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc",
"timestamp": 1529891469000
},
"witness_signature": "4544a6004c76286a1d6248f451bf148345a51e21881e84899758468da7b1c7e85b809735a1b2be29f166cfba8c5e69543f4f24294fbfa0498a39002166a397ba00"
}
}
]
}

wallet/getblockbylatestnum

Retrieves several latest blocks.

Parameters

  • num (integer; required): the number of blocks to retrieve.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getblockbylatestnum' \
-H 'Content-Type: application/json' \
-d '{
"num": 2
}'

Response example

{
"block": [
{
"blockID": "0000000002fae13af77e3d41a08627787aac6d6b14b35a6a0f61d2f6406a6786",
"block_header": {
"raw_data": {
"number": 49996090,
"txTrieRoot": "8d3996515f1a5920b10654086f36bcf0f530884da714ed1c615199ad1cb51802",
"witness_address": "4167e39013be3cdd3814bed152d7439fb5b6791409",
"parentHash": "0000000002fae139af04335a42dcd2634f64a74b6f50eaabb7d7d4da3c6034f9",
"version": 27,
"timestamp": 1680601062000
},
"witness_signature": "999930eb33440390207ef38a1c5bc2dfe58f5b4daa6999a7da5f1befdace72e3046ee3d7546fc09df68af22e71f126f9f1a247cb1b9bded32651558b6d3ad2e801"
},
"transactions": [
{
"ret": [
{
"contractRet": "SUCCESS"
}
],
"signature": [
"6830537a8b58835a7d1b1f97821e4adb16e8c508de08cc1a50408818593c84d972c7ad32cff868cbab506a4f1cf13e4be9eaf9348621f27f4097a53fc05901551b"
],
"txID": "6702a31b744e701527f8b412da6430173dbb0e04e6a70341aa4fdc94719b799f",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 50000000,
"owner_address": "41c0629df9ebfc8f5ec92e576c350afa72ef63ae5e",
"to_address": "4194b0f036660971a160c434d3a021edbd966f524b"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract"
}
],
"ref_block_bytes": "e125",
"ref_block_hash": "f07be41bafac0989",
"expiration": 1680601235964,
"timestamp": 1680601055964
},
"raw_data_hex": "0a02e1252208f07be41bafac098940fc838fddf4305a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a1541c0629df9ebfc8f5ec92e576c350afa72ef63ae5e12154194b0f036660971a160c434d3a021edbd966f524b1880e1eb1770dc8584ddf430"
}
]
}
]
}

wallet/getblockbalance

Retrieves all balance change operations in a block.

Parameters

  • hash (string; hex; required): a block hash (a hash must belong to a block number specified).
  • number (integer; required): a block number.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getblockbalance' \
-H 'Content-Type: application/json' \
-d '{
"hash": "0000000002fac947605b4fd36f344e00ab9e79568574b74ac7575419e437956a",
"number": 49989959,
"visible": true
}'

wallet/gettransactionbyid

Retrieves transaction information by transaction ID.

Parameters

  • value (string; hex; required): a transaction ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/gettransactionbyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "309b6fa3d01353e46f57dd8a8f27611f98e392b50d035cef213f2c55225a8bd2"
}'

wallet/gettransactioninfobyid

Retrieves the transaction fee and block height by transaction ID.

Parameters

  • value (string; hex; required): a transaction ID.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/gettransactioninfobyid' \
-H 'Content-Type: application/json' \
-d '{
"value": "309b6fa3d01353e46f57dd8a8f27611f98e392b50d035cef213f2c55225a8bd2"
}'

wallet/gettransactioncountbyblocknum

Retrieves the number of transactions in a specific block.

Parameters

  • num (integer; required): block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/gettransactioncountbyblocknum' \
-H 'Content-Type: application/json' \
-d '{
"num": 49989959
}'

Response example

{
"count": 309
}

wallet/gettransactioninfobyblocknum

Retrieves the list of transaction information in a specific block.

Parameters

  • num (integer; required): block height.

Request example

curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/gettransactioninfobyblocknum' \
-H 'Content-Type: application/json' \
-d '{
"num": 49989959
}'

Response example

[
{
"blockNumber": 49989959,
"contractResult": [
""
],
"blockTimeStamp": 1680582663000,
"receipt": {
"net_usage": 268
},
"id": "1dca7ae3d0fc5b73b5bc3ede1d2eb1b63fc128fce39196088a2198ff83fbc5ed"
},
{
"blockNumber": 49989959,
"contractResult": [
""
],
"blockTimeStamp": 1680582663000,
"receipt": {
"net_usage": 265
},
"id": "04d86b079842247e14cd0c4648e315b78c861eb91abcaf4e022f88155b73f628"
},
{
"blockNumber": 49989959,
"contractResult": [
""
],
"blockTimeStamp": 1680582663000,
"receipt": {
"net_usage": 280
},
"id": "a1b550fa6681c4afc90f619a2fa4ca26305b09bc964bef5a833123626e451391"
}
]