> 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/query-platform-total-delegation.md).

# 查询平台代理总量

### 接口调用

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

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

#### Request Body

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| sourceFlag<mark style="color:red;">\*</mark> | String | 来源标识        |

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

```javascript
{
  "resCode": 100,
  "resMsg": "Success",
  "data": [
    { "type": "ENERGY", "num": 125000000 },
    { "type": "BANDWIDTH", "num": 3000000 }
  ]
}

```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### 调用示例

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

```
// example
const params = {
    "sourceFlag": "tronify"
}
 const res = await axios.post('https://open.tronify.io/api/staking/getTotalResource',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%2Fbp9cjFFjDjHzaquzoTHr%2Fimage.png?alt=media&amp;token=5514d495-2dc7-4b80-bf32-b32d18a1afca" alt=""><figcaption></figcaption></figure>
