/walletsolidity/getdelegatedresourcev2 - Tron
Example code for the getdelegatedresourcev2 Solidity API method. Complete guide on how to use getdelegatedresourcev2 Solidity API method in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/getdelegatedresourcev2' \
--header 'Content-Type: application/json' \
--data-raw '{
"fromAddress": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
"toAddress": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"visible": true
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/getdelegatedresourcev2',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"fromAddress": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "toAddress": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh", "visible": true})
}
);
console.log(await response.json());import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/walletsolidity/getdelegatedresourcev2',
headers={'Content-Type': 'application/json'},
json={"fromAddress": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "toAddress": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh", "visible": true}
)
print(response.json())Response
{
"delegatedResource": [
{
"from": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
"to": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"frozen_balance_for_energy": 1000000000,
"expire_time_for_energy": 0
}
]
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?