卖家授权
授权tronify出售能量
接口调用
POST
https://open.tronify.io/api/tronRent/sellerAuthCheck
以下参数带*字段为必填,不带*号为选填
Headers
Name
Type
Description
api-key*
访问tronify.io买家管理平台获取
Request Body
Name
Type
Description
fromAddress*
String
用户地址(钱包地址)
sourceFlag*
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: 'tronLink'
}
const headers = {
'api-key': 'your-api-key'
};
const res = await axios.post('https://open.tronify.io/api/tronRent/sellerAuthCheck',params, { headers })
console.log(res)
if(res.resCode === '100'){
//...
}
Postman 示例

Last updated