मुख्य सामग्री पर जाएं
POST
/
api
/
v1
/
energy
/
buy
एनर्जी खरीदें
curl --request POST \
  --url https://api.example.com/api/v1/energy/buy \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_address": "<string>",
  "volume": 123,
  "duration": "<string>"
}
'
{
  "id": 123,
  "status": "<string>",
  "txid": {},
  "price_trx": "<string>",
  "reclaim_at": {},
  "activation_cost_trx": "<string>"
}

एनर्जी खरीदें

निर्दिष्ट TRON एड्रेस को एनर्जी डेलिगेट करता है। लागत आपके अकाउंट बैलेंस से काटी जाती है।

अनुरोध बॉडी

target_address
string
आवश्यक
लक्ष्य TRON एड्रेस (T… प्रारूप, 34 अक्षर)
volume
number
आवश्यक
डेलिगेट करने के लिए एनर्जी की मात्रा (न्यूनतम 32,000, अधिकतम 5,000,000)
duration
string
आवश्यक
किराये की अवधि: "1h" (1 घंटा) या "1d" (1 दिन, केवल bandwidth)

रिस्पॉन्स

id
number
Unique order identifier
status
string
Order status: pending, filled, failed
txid
string | null
On-chain transaction id once the delegation is broadcast (null while pending)
price_trx
string
Total cost charged from your balance, in TRX
reclaim_at
string | null
ISO 8601 timestamp when the bandwidth rental is reclaimed (energy is reclaimed automatically by the provider)
activation_cost_trx
string
Address activation cost in TRX ("0" if the recipient is already activated)

उदाहरण

curl -X POST https://api.tronrental.com/v1/energy/buy \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "target_address": "TYourRecipientAddress1234567890abc",
    "volume": 65000,
    "duration": "1h"
  }'
Response
{
  "id": 12345,
  "price_trx": "2.75",
  "status": "pending"
}
65,000 एनर्जी उस एड्रेस पर एक USDT ट्रांसफर को कवर करती है जिसके पास पहले से USDT है। पहली बार USDT प्राप्त करने वालों के लिए 131,000 का उपयोग करें (नए स्टोरेज स्लॉट का निर्माण)।