> 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-recent-finished-order.md).

# 查询最近完成订单

### &#x20;接口调用

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

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

#### 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 | 条数                       |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": [
        {
            "orderId": "c490cwg0_8ad1_d81n_h9mk_qyt3x50jj4er",
            "relateOrderId": "qzld7n3q_5jfd_sx2l_k611_sf14yriioaux",
            "orderType": "ENERGY",
            "orderPrice": "112",
            "pledgeNum": "500",
            "payTrxNum": "0.117599",
            "createTime": "2023-04-06 11:22:57",
            "pledgeHash": "99da5697d4f03e41e7db000729cdb7b2c34310bb0dd5f1ebae859aacbe715a17"
        },
        {
            "orderId": "0glfxyv5_auu1_5a3z_kg9q_xts9ss7bw077",
            "relateOrderId": "sp8nrdgt_1ivg_1p8y_v9np_591c5lxjj2h2",
            "orderType": "ENERGY",
            "orderPrice": "110",
            "pledgeNum": "1000",
            "payTrxNum": "0.230999",
            "createTime": "2023-04-06 11:10:51",
            "pledgeHash": "431c18ef4aeaac4f7d5a90bf4d1fc83518e74425815593205593de506451b0a6"
        }
    ]
}
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

### 调用示例

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

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

{% endtab %}
{% endtabs %}

### Postman 示例

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