시작하기

API 키를 받으려면 대시보드에 등록하세요.

전체 문서 →
API 엔드포인트
GET /calculate-order-price

에너지 렌탈 예상 비용과 렌트 가능한 에너지 수량 조회

요청 URL
https://api.tronenergyrent.com/calculate-order-price?period=[RENTAL_DURATION]&energyAmount=[ENERGY_AMOUNT]
요청 매개변수 유형 필수 설명
period string 대여 기간. 다음 값 중 하나:
"1h" – 1시간
"1d" – 1일
"3d" – 3일
"30d" – 30일
energyAmount int 대여할 TRON 에너지 양 (최소 15000 유닛).
preActivateDestinationAddress int 아니요 TRON 네트워크에서는 에너지를 받기 전에 주소가 활성화되어 있어야 합니다. TRON 주소 활성화를 포함한 에너지 대여 비용을 계산하려면 preActivateDestinationAddress=1 을 전송하세요. 그렇지 않으면 "0"으로 설정하거나 이 매개변수를 무시하세요.
응답 본문 예시
{
  "status": "SUCCESS",
  "errorCode": null,
  "errorDescription": null,
  "requestId": "9d13d94d-4",
  "payload": {
    "availableEnergy": 75820891,
    "totalEnergy": 561779790,
    "minimumOrderEnergy": 15000,
    "maximumOrderEnergy": 200000000,
    "totalPriceSun": 2860000,
    "totalPriceTrx": 2.86,
    "explanation": "The price for each unit of energy is 44 SUN. The final price is calculated as 65000 ENERGY × 44 SUN = 2860000 SUN (2.860000 TRX)."
  }
}
GET /place-order

지정된 TRON 지갑에 에너지 렌트 요청

요청 URL
https://api.tronenergyrent.com/place-order?apiKey=[YOUR_API_KEY]&period=[RENTAL_DURATION]&energyAmount=[ENERGY_AMOUNT]&destinationAddress=[WALLET]
요청 매개변수 유형 필수 설명
apiKey string 대시보드의 API 키
period string 대여 기간. 다음 값 중 하나:
"1h" – 1시간
"1d" – 1일
"3d" – 3일
"30d" – 30일
energyAmount int 대여할 TRON 에너지 양 (최소 15000 유닛).
destinationAddress string 에너지를 수신할 대상 TRON 주소
preActivateDestinationAddress int 아니요 TRON 네트워크에서는 에너지를 받기 전에 주소가 활성화되어 있어야 합니다.
에너지 수신 전에 주소를 활성화하려면
preActivateDestinationAddress=1 을 설정하세요. 그렇지 않으면 "0"으로 설정하거나 이 매개변수를 무시하세요.
값을 "1"로 설정하면 1.5 TRX 활성화 수수료가 잔액에서 차감됩니다
응답 본문 예시
{
  "status": "SUCCESS",
  "errorCode": null,
  "errorDescription": null,
  "requestId": "2651eacd-2428",
  "payload": {
    "orderId": "128de799-501e-44b2-8d6f-1fa825c2deed",
    "totalPriceSun": 5662800,
    "totalPriceTrx": 5.6628,
    "state": "PAID_BY_USER"
  }
}