> 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/tron-api/query-purchase-order-records-by-user-address.md).

# 查询地址买单记录

### &#x20;接口调用

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

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

#### Request Body

| Name                                          | Type    | Description                                                                                |
| --------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ |
| sourceFlag<mark style="color:red;">\*</mark>  | String  | 渠道来源（需要双方约定一个名称来代表三方的渠道）                                                                   |
| page<mark style="color:red;">\*</mark>        | Integer | 页码                                                                                         |
| pageSize<mark style="color:red;">\*</mark>    | Integer | 条数                                                                                         |
| orderType<mark style="color:red;">\*</mark>   | String  | <p>1：查询状态是wait\_deposit\_send，wait\_sale的进行中的买单 <br>0：查询状态是complete的买单 <br>其他值：查询所有的买单</p> |
| fromAddress<mark style="color:red;">\*</mark> | String  | 用户地址                                                                                       |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "data": [
            {
                "orderId": "2ombu8zk_3jet_0mle_g7id_2mi3gnl6fk4y",
                "fromAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeNum": 555,
                "salePledgeNum": 0,
                "freezePledgeNum": 0,
                "leftPledgeNum": 555,
                "orderPrice": "110",
                "orderType": "ENERGY",
                "pledgeDay": "3",
                "orderStatus": "wait_sale",
                "createTime": "2023-04-11 16:29:55"
            },
            {
                "orderId": "gzbh4w53_k0qb_9x7d_elwm_dw8aoas7olbt",
                "fromAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeNum": 555,
                "salePledgeNum": 0,
                "freezePledgeNum": 0,
                "leftPledgeNum": 555,
                "orderPrice": "110",
                "orderType": "ENERGY",
                "pledgeDay": "3",
                "orderStatus": "timeout",
                "createTime": "2023-04-11 16:17:14"
            }
        ],
        "pagination": {
            "page": 1,
            "pageSize": 10,
            "total": 2
        }
    }
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### 调用示例

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

```
// example
const params = {
    fromAddress: 'TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS',
    orderType: 0,
    page: 1,
    pageSize: 10,
    sourceFlag: 'tronLink'
}
 const res = await axios.post('https://open.tronify.io/api/tronRent/mypayorder',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman 示例

<figure><img src="/files/n7Qa41JGo0t1leA5ZGOA" alt=""><figcaption></figcaption></figure>
