orders/{order_id} - TRON energy
Example code for the orders/{order_id} JSON RPC method. Сomplete guide on how to use orders/{order_id} JSON RPC in GetBlock Web3 documentation.
Path Parameter
Request Sample
curl -X GET "https://api.getblock.io/tron-energy/orders/success" \
-H "Authorization: Bearer YOUR_API_KEY"const axios = require('axios');
const orderId = "success";
const url = `https://api.getblock.io/tron-energy/orders/${orderId}`;
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response.data);
});import requests
order_id = "success"
url = f"https://api.getblock.io/tron-energy/orders/{order_id}"
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get(url, headers=headers)
print(response.text)Response Sample
{
"order_id": "clxyz123...",
"status": "success",
"target_address": "TUo8pycbvje9w2XYsNnnzw67bpPs4GLFyD",
"resource_type": "energy",
"volume": 65000,
"duration": "3d",
"price_usd": "4.97",
"trx_spent": 20.12,
"provider_order_id": "12345",
"created_at": "2026-02-08T12:00:00.000Z"
}
Last updated
Was this helpful?