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

Get related configuration

Endpoint usage

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

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

Request Body

Name
Type
Description

address*

String

User address (Wallet address)

sourceFlag*

String

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

{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "defaultDay": 3, //default freezing days
        "defaultEnergyPrice": 60, //default energy purchase price 
        "topEnergyPrice": 420, //energy purchase max price
        "lowEnergyPrice": 30, //energy purchase min price
        "topEnergyCanBuy": 1000000000, //energy purchase max value
        "lowEnergyCanBuy": 1000, //energy purchase min value
        "defaultWidthPrice": 900, //default bandwidth purchase price
        "topWidthPrice": 2000, //bandwidth purchase max price
        "lowWidthPrice": 600, //bandwidth purchase min price
        "topWidthCanBuy": 10000000, //bandwidth purchase max value
        "lowWidthCanBuy": 3500, //bandwidth purchase min value
        "refundRate": 0.1, //cancellation charge
        "sellerStakingTrxMinLimit": 10000, //The minimum limit for a seller to pledge TRX
        "energyPriceMaxSun": 1000, //The maximum limit for a seller to authorize the sale of energy
        "sendEnergy": 0,
        "receiveEnergy": 0,
        "sendWidth": 0,
        "receiveWidth": 0,
        "sun_1d": 95,
        "sun_1h": 85,
        "sun_2d": 90,
        "sun_3h": 90,
        "sun_10m": 80,
        "treasureType": [
            {
                "type": "transfer",
                "value": "32000"
            }
        ]
    }
}

code example

// example
const params = {
    address: 'TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k',
    sourceFlag: 'tronLink'
}
 const res = await axios.post('https://open.tronify.io/api/tronRent/pledgeConfig',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }

Postman example

PreviousBasic informationNextPre-order

Last updated 5 days ago