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