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

# 创建代理订单

### 接口调用

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

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

#### Request Body

| Name                                         | Type   | Description   |
| -------------------------------------------- | ------ | ------------- |
| address<mark style="color:red;">\*</mark>    | String | 用户钱包地址（代理发起方） |
| pledgeNum<mark style="color:red;">\*</mark>  | Number | 能量代理数量        |
| orderType<mark style="color:red;">\*</mark>  | String | 代理类型          |
| sourceFlag<mark style="color:red;">\*</mark> | String | 来源标识          |

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

### 调用示例

{% 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 示例

<figure><img src="https://437826888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4K3XSHX743UkF46Owwyj%2Fuploads%2FQ20x0l1vdFbXYg1JMuDr%2Fimage.png?alt=media&amp;token=430a4c59-32ef-48e4-8c29-7995c960cabe" alt=""><figcaption></figcaption></figure>
