delegate-energy - TRON energy
Example code for the delegate-energy JSON RPC method
Parameter
Idempotency
Idempotency-Key: 6f9c2a1e-3b7d-4c08-9f21-2e5a7c0b1d44Situation
Result
Request Sample
curl -X POST https://services.getblock.io/v1/tron-energy/delegate-energy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f9c2a1e-3b7d-4c08-9f21-2e5a7c0b1d44" \
-d '{
"target_address": "TUo8pycbvje...zw67bpPs4GLFyD",
"volume": 65000,
"duration": "1h"
}'import axios from 'axios';
const data = JSON.stringify({
"target_address": "TUo8pycbvje...zw67bpPs4GLFyD",
"volume": 65000,
"duration": "1h"
}
);
const config = {
method: 'post',
url: 'https://services.getblock.io/v1/tron-energy/delegate-energy',
headers: {
'Content-Type': 'application/json',
'Authorization: Bearer YOUR_API_KEY'
'Idempotency-Key: 6f9c2a1e-3b7d-4c08-9f21-2e5a7c0b1d44' \
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
Last updated
Was this helpful?