Tron API En
Chinese API
  • Basic information
  • Tron API
    • Get related configuration
    • Pre-order
    • create trx engerg order
    • create usdt engerg order
    • create bandwidth order
    • upload purchase order hash
    • create a sell order
    • Earn energy by stake
    • recovered energy
    • cancel order
    • query purchase order
    • query recent finished order
    • query purchase order records by user address
    • query sell order records by user address
  • Seller Tron API
    • Get seller configuration
    • Seller authorization
    • Update seller configuration
    • Get seller panel
  • Buyer Tron API
    • Get buyer configuration
    • Buyer charge
    • Buyer withdraw
    • Buyer leas energy
    • Buyer leas energy records
    • Buyer asset records
  • FAQ
    • Error Code
Powered by GitBook
On this page
  • Endpoint usage
  • code example
  • Postman example
  1. Tron API

Pre-order

Endpoint usage

POST https://open.tronify.io/api/tronRent/queryPreorderInfo

The fields with * are required, and the fields without * are optional

Request Body

Name
Type
Description

fromAddress*

String

user address(wallet address for buyer)

pledgeAddress*

String

energy receiving address.

pledgeNum*

int

amount of energy

orderType*

String

ENERGY

sourceFlag*

String

Source channel (Both sides need to agree on a name to represent the channel of the third parties)

tradeType*

String

fastTrade

pledgeDay*

String

Rental Time(unit: day)

values: 0-30

( pledgeDay, pledgeHour, and pledgeMinute cannot be 0 simultaneously)

pledgeHour*

String

Rental Time(unit: hour)

values: 0, 1, 3

pledgeMinute*

String

Rental Time(unit: minute)

values: 0, 10

extraTrxNum

String

The amount of additional trx the user wants to receive Value range (0.5, 500] (USDT get energy model)

pledgeBandwidthNum

String

The amount of additional bandwidth the user wants to receive. If 0 or no passed, it means no bandwidth is required. (USDT get energy model)

{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "fromAddress": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",//User wallet address
        "pledgeAddress": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",//User receiving energy address
        "pledgeDay": "0",
        "pledgeHour": "0",
        "pledgeMinute": "10",
        "source": "tronLink",
        "orderType": "ENERGY",
        "orderPrice": 90,
        "pledgeNum": 96400,
        "pledgeTrxNum": "10.512",
        "usdtModeAvailable": true,
        "payCoinCode": "USDT", //Payment Currency
        "payCoinAmt": "3.124527",//payment amount
        "extraTrxNum": "0.8",//The amount of additional trx the user wants to receive
        "pledgeBandwidthNum": "0",//The amount of bandwidth the user wants to obtain
        "activeAccountFee": "0",//the fee of activation address
        "purchaseTRXFee": "0.397105",//the fee of extra trx
        "purchaseBandwidthFee": "0",//the fee of bandwidth
        "purchaseEnergyFee": "2.727422"//the fee of energy
        //...
    }
}

code example

// example
const params = {
    fromAddress: 'TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k',
    pledgeAddress: 'TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k',
    tradeType: 'fastTrade',
    pledgeDay: '0',
    pledgeHour: '0',
    pledgeMinute: '10',
    orderType: 'ENERGY',
    pledgeNum: 32000,
    sourceFlag: 'tronLink',
    extraTrxNum: '0.8',
    pledgeBandwidthNum: '0'
}
const res = await axios.post('https://open.tronify.io/api/tronRent/queryPreorderInfo',params)
console.log(res)
if(res.resCode === '100'){
     // ... 
}

Postman example

PreviousGet related configurationNextcreate trx engerg order

Last updated 5 days ago