> For the complete documentation index, see [llms.txt](https://docs-tron.tronify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tron.tronify.io/tron-api/get-related-configuration.md).

# 获取相关配置信息

### 接口调用

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/tronRent/pledgeConfig`

**以下参数带\*字段为必填，不带\*号为选填**

#### Request Body

| Name                                         | Type   | Description              |
| -------------------------------------------- | ------ | ------------------------ |
| address<mark style="color:red;">\*</mark>    | String | 用户地址（钱包地址）               |
| sourceFlag<mark style="color:red;">\*</mark> | String | 渠道来源（需要双方约定一个名称来代表三方的渠道） |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "defaultDay": 3, //默认冻结天数
        "defaultEnergyPrice": 60, //默认购买能量价格 
        "topEnergyPrice": 420, //购买能量最高价格
        "lowEnergyPrice": 30, //购买能量最低价格
        "topEnergyCanBuy": 1000000000, //能量购买最大值
        "lowEnergyCanBuy": 15000, //能量购买最小值
        "defaultWidthPrice": 900, //默认购买带宽价格
        "topWidthPrice": 2000, //购买带宽最高价格
        "lowWidthPrice": 600, //购买带宽最低价格
        "topWidthCanBuy": 10000000, //带宽购买最大值
        "lowWidthCanBuy": 3500, //带宽购买最小值
        "refundRate": 0.1, //取消订单手续费
        "sellerStakingTrxMinLimit": 10000, //卖家质押trx最小限制
        "energyPriceMaxSun": 1000, //卖家授权出售能量最高限制
        "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"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### 调用示例

{% tabs %}
{% tab title="JavaScript" %}

```
// 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'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman 示例

<figure><img src="/files/JitAVEsmzaMnROMngEPV" alt=""><figcaption></figcaption></figure>
