> 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/stakepal-api/claim-revenue.md).

# 提取收益

### 接口调用

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

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

#### Headers

| Name                                           | Type   | Description             |
| ---------------------------------------------- | ------ | ----------------------- |
| api-key<mark style="color:red;">\*</mark>      | String | 「登录」接口返回的 `user.apiKey` |
| access-token<mark style="color:red;">\*</mark> | String | 「登录」接口返回的 `token`       |

#### Request Body

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| address<mark style="color:red;">\*</mark>    | String | 用户地址（钱包地址）  |
| sourceFlag<mark style="color:red;">\*</mark> | String | 来源标识        |
| stakingId<mark style="color:red;">\*</mark>  | String | 记录 id       |

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

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

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### 调用示例

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

```
// example
const params = {
    "address": "Txxxxxxxxxxxxxxxxx",
    "sourceFlag": "tronify",
    "stakingId": "1"
}
 const res = await axios.post('https://open.tronify.io/api/staking/claimReward',params)
 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%2FgelBmIv3ViMfSCWaUvFa%2Fimage.png?alt=media&amp;token=e8570a7c-7e9c-4a99-a1a7-47df37ad852c" alt=""><figcaption></figcaption></figure>
