> For the complete documentation index, see [llms.txt](https://docs-tron.en.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.en.tronify.io/stakepal-api/query-platform-total-delegation.md).

# Query Platform Total Delegation

### Endpoint usage

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

The fields with \* are required, and the fields without \* are optional

#### Request Body

| Name                                         | Type   | Description       |
| -------------------------------------------- | ------ | ----------------- |
| sourceFlag<mark style="color:red;">\*</mark> | String | Source identifier |

{% 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 %}

### code example

{% 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 example

<figure><img src="https://3188465811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnv0Qbx2yTtH3TKQFd528%2Fuploads%2F675QrrLIzsJ9DTP8vgvJ%2Fimage.png?alt=media&amp;token=3cbc3bab-1104-4d7d-89e4-3d71f816a7b8" alt=""><figcaption></figcaption></figure>
