# 获取买家信息

### 接口调用

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

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

#### Headers

| Name                                      | Type   | Description          |
| ----------------------------------------- | ------ | -------------------- |
| api-key<mark style="color:red;">\*</mark> | String | 访问tronify.io买家管理平台获取 |

#### 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": {
        "id": 15,
        "address": "TUFXua1qzfCsFpcZEGXaU7oGFURqQ7RQpy",
        "balance": "0", //充值trx数量
        "invitationCode": "",
        "tronAddress": "TBuPND7n66qNf3AbYNJA458duuV3ZyWtUk",
        "freezeBalance": null,
        "whiteState": 0,
        "giftBalance": "0", //充值奖励trx数量
        "apiKey": "your-api-key",
        "sourceFlag": "tronify",
        "totalBalance": "0", //总trx数量
        "contractAddress": "TXnafj5Xh4G7jqTwajvdvaAvKegMwCLTyL", // 平台存币地址
        "giftRatio": [ //单笔充值trx数量范围和对应充值trx数量的奖励比例
            [
                50,
                100,
                0.1
            ],
            [
                100,
                100000,
                0.2
            ]
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### 调用示例

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

```
// example
const params = {
    address: 'TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k',
    sourceFlag: 'tronLink'
}
const headers = {
  'api-key': 'your-api-key'
};
 const res = await axios.post('https://open.tronify.io/api/tronRent/user/info',params, { headers })
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman 示例

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-tron.tronify.io/tron-api-buyer/get-buyer-info.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
