# query sell order records by user address

### &#x20;Endpoint usage

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

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

#### Request Body

| Name                                          | Type    | Description                                                                                                                                                                                                                                                                 |
| --------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sourceFlag<mark style="color:red;">\*</mark>  | String  | Source channel (Both sides need to agree on a name to represent the channel of the third parties)                                                                                                                                                                           |
| page<mark style="color:red;">\*</mark>        | Integer | page num                                                                                                                                                                                                                                                                    |
| pageSize<mark style="color:red;">\*</mark>    | Integer | record size                                                                                                                                                                                                                                                                 |
| orderType<mark style="color:red;">\*</mark>   | String  | <p>0: Query completed sell orders.<br>1: Query sell orders with the status of wait\_deposit\_send, wait\_receive\_send, error\_hacker, error, wait\_receive\_confirm, wait\_receive\_confirm\_error, and wait\_unfreeze.<br><br>Other values: Query all staking orders.</p> |
| fromAddress<mark style="color:red;">\*</mark> | String  | user address (wallet address)                                                                                                                                                                                                                                               |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "data": [
            {
                "orderId": "ud0xs8vw_pdc1_01ao_dvlp_fkv141z3dmnc",
                "relateOrderId": "mt1wxcl1_dplo_r0qp_5bho_w5an5hev6d70",
                "orderType": "ENERGY",
                "orderPrice": "110",
                "pledgeAddress": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
                "pledgeNum": "500",
                "orderStatus": "timeout",
                "pledgeTrxNum": "28",
                "expireTime": "2023-04-14 15:44:00",
                "createTime": "2023-04-11 15:44:00",
                "pledgeHash": ""
            },
            {
                "orderId": "kgd270ul_k486_kt7e_8yq2_nvgev6he6zdh",
                "relateOrderId": "mt1wxcl1_dplo_r0qp_5bho_w5an5hev6d70",
                "orderType": "ENERGY",
                "orderPrice": "110",
                "pledgeAddress": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
                "pledgeNum": "600",
                "orderStatus": "timeout",
                "pledgeTrxNum": "34",
                "expireTime": "2023-04-14 14:06:00",
                "createTime": "2023-04-11 14:06:00",
                "pledgeHash": "0a5eaefb965dedaf1817806fce0d6df1495a2364e714775ee1dc13953f694d18"
            },
            ...
        ],
        "pagination": {
            "page": 1,
            "pageSize": 10,
            "total": 7
        }
    }
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### code example

{% 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/myfreeze',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%2F7K2PyPkZBVrSzRNjD8cA%2F10.jpg?alt=media&#x26;token=0bfe66c5-85d9-44d6-9b71-504da366ff60" alt=""><figcaption></figcaption></figure>
