> 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/create-delegation-order.md).

# Create Delegation Order

### Endpoint usage

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

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

#### Request Body

| Name                                         | Type   | Description                                |
| -------------------------------------------- | ------ | ------------------------------------------ |
| address<mark style="color:red;">\*</mark>    | String | User wallet address (delegation initiator) |
| pledgeNum<mark style="color:red;">\*</mark>  | Number | Energy delegation amount                   |
| orderType<mark style="color:red;">\*</mark>  | String | Delegation type                            |
| sourceFlag<mark style="color:red;">\*</mark> | String | Source identifier                          |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
       "orderId": "tb_xxx",
       "delegateAddress": "T...",
       "receiveAddress": "T...",
       "orderType": "ENERGY",
       "pledgeTrxNum": 1234.56,
       "pledgeNum": 100000
    }
}
 
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### code example

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

```
// example
const params = {
    "address":"TWQFDEnAmgNPEFcQy46oggZLG3yDfXEokx",
    "pledgeNum":100,
    "orderType":"ENERGY",
    "sourceFlag": "staking"
}
 const res = await axios.post('https://open.tronify.io/api/staking/info',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%2F3Lj5gZzFsW9ivSb04gMM%2Fimage.png?alt=media&amp;token=151926d3-f6d3-4f2a-9fed-808d68073cf4" alt=""><figcaption></figcaption></figure>
