# 买家提币

### 接口调用

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

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

#### 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 | 渠道来源（需要双方约定一个名称来代表三方的渠道） |
| balance<mark style="color:red;">\*</mark>    | String | 提取trx数量                  |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {}
}
```

{% endtab %}
{% endtabs %}

### 调用示例

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

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

{% endtab %}
{% endtabs %}

### Postman 示例

<figure><img src="https://437826888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4K3XSHX743UkF46Owwyj%2Fuploads%2F2jQBTgfqVbqgdAW050bG%2F17.jpg?alt=media&#x26;token=e927343e-f7bd-4436-abfb-91657e329dbe" alt=""><figcaption></figcaption></figure>
