Use API key
Buy Energy with API Key Flow
Step 1: Create an Internal Account and Deposit Funds
Create an internal account.
Deposit TRX into the internal account.
Guide full step to get the API key
Step 2: Check Account Information
Use the Get Internal Account Info API to verify your account balance and status.
Step 3: Check Available Energy
Call the Get Order Book API to view the amount of energy available on the system.
Step 4: Estimate the TRX Required
Enter the desired energy amount and rental duration into the Estimate of TRX API to calculate the TRX needed.
Step 5: Execute the Buy Transaction
Enter the calculated TRX amount to the Create order API and send the request.
Step 6: Check Order Details and History
Use the Get one order details API will review the details of your buy.
Use the Get Internal Account Order History API to check your transaction history.
Last updated