更新卖家出售相关配置
更新配置信息
接口调用
POST
https://open.tronify.io/api/tronRent/updateApproveInfo
以下参数带*字段为必填,不带*号为选填
Headers
Name
Type
Description
api-key*
访问tronify.io买家管理平台获取
Request Body
Name
Type
Description
fromAddress*
String
用户地址(钱包地址)
sourceFlag*
String
渠道来源(需要双方约定一个名称来代表三方的渠道)
energy_price_customize*
String
自定义出售能量最低价(0:默认
1:自定义)
energy_min_sun
String
设置出售能量最低价
flag*
String
"{api-key}SWFTstakeapprove{timeStamp}"的md5值(大写)
timeStamp*
String
时间戳
{
"resCode": 100,
"resMsg": "Success",
"data": {
"from_address": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
"approve_address": "TGVEVDZZHJGZAHEPfou57u8F89i5nNNRxX",//授权地址
"approve_id": 3, //授权id
"approve_type": "1,2,3,4,5",
"auto_sale": 1,
"auto_vote": 1,
"energy_price_customize": 1,//自定义出售能量最低价,默认0
"energy_price_low": 60, //设置出售能量最低价,不设置默认60
"bandwidth_price_customize": 0,
"bandwidth_price_low": 0,
"auto_withdraw": 1,
"withdraw_left": 0,
"auto_staking": 1,
"stake_left": 0,
"staking_trx": "178260 //质押trx数量
"staking_available_trx": "5114.939104" //可租赁trx数量
}
}
调用示例
// 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 示例

Last updated