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. Seller Tron API

Update seller configuration

Endpoint usage

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

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

Headers

Name
Type
Description

api-key*

String

Access the buyer management platform of tronify.io to obtain it

Request Body

Name
Type
Description

fromAddress*

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)

energy_price_customize*

String

Customize the minimum selling price of energy (0: default, 1: custom)

energy_min_sun

String

Set the minimum selling price of energy

flag*

String

md5 value of "{api-key}SWFTstakeapprove{timeStamp}" (Uppercase)

timeStamp*

String

timeStamp

{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "from_address": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
        "approve_address": "TGVEVDZZHJGZAHEPfou57u8F89i5nNNRxX",//authorization address
        "approve_id": 3, //authorization id
        "approve_type": "1,2,3,4,5",
        "auto_sale": 1,
        "auto_vote": 1,
        "energy_price_customize": 1,//Customize the minimum selling price of energy, default is 0.
        "energy_price_low": 60, //Set the minimum selling price of energy, default is 60 if not set.
        "bandwidth_price_customize": 0,
        "bandwidth_price_low": 0,
        "auto_withdraw": 1,
        "withdraw_left": 0,
        "auto_staking": 1,
        "stake_left": 0,
        "staking_trx": "178260 //Staked TRX amount
        "staking_available_trx": "5114.939104" //Available TRX for lease
    }
}

code example

// example
const params = {
    "fromAddress": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
    "sourceFlag": "path",
    "energy_price_customize": 1,
    "energy_min_sun": 57,
    "flag": "md5-xxxxx",
    "timeStamp": 1684941701
}
const headers = {
  'api-key': 'your-api-key'
};
const res = await axios.post('https://open.tronify.io/api/tronRent/updateApproveInfo',params, { headers })
console.log(res)
if(res.resCode === '100'){
   //...  
}

Postman example

PreviousSeller authorizationNextGet seller panel

Last updated 1 year ago