为 TRON 地址购买能量
cURL
curl --request POST \ --url https://api.example.com/api/v1/energy/buy \ --header 'Content-Type: application/json' \ --data ' { "address": "<string>", "energy_amount": 123, "duration_hours": 123 } '
{ "order_id": 123, "address": "<string>", "energy_amount": 123, "duration_hours": 123, "price_trx": "<string>", "status": "<string>" }
pending
filled
failed
curl -X POST https://api.tronrental.com/v1/energy/buy \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{ "address": "TYourRecipientAddress1234567890abc", "energy_amount": 65000, "duration_hours": 1 }'
{ "order_id": 12345, "address": "TYourRecipientAddress1234567890abc", "energy_amount": 65000, "duration_hours": 1, "price_trx": "2.75", "status": "pending" }