# 获取内部账户订单历史

要使用此功能，您必须拥有 API 密钥。请阅读[**这里**](/chinese/developer/get-api-key.md)以了解如何获取我们的 API 密钥。

## 通过 API 密钥获取历史

<mark style="color:blue;">`GET`</mark> `https://api.tronsave.io/v0/orders`

速率限制 (Rate limit): 每1秒15个请求。

获取许多订单按创建时间排序。默认：返回10个最新订单

#### Query Parameters

| Name     | Type    | Description      |
| -------- | ------- | ---------------- |
| page     | Integer | 从0开始. Default: 0 |
| pageSize | Integer | Default: 10      |

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

```javascript
{
   data:{
     id: string, // 订单的 ID
     requester: string, // 代表订单所有者的地址
     target: string, // 收到资源的地址
     resource_amount: number, // 资源的数量
     resource_type: string, // 资源类型为 "ENERGY"
     remain_amount: number, // 系统可以匹配的剩余数量
     price: number, // 价格单位等于 sun
     duration: number, // 租赁期限，以秒为单位
     allow_partial_fill: boolean, // 允许订单部分成交或不允许
     payout_amount: number, // 此订单的总支付金额
     fulfilled_percent: number, // 显示填充进度的百分比，范围从0到100
   } [],
   total:number
}

```

{% endtab %}
{% endtabs %}

**例子&#x20;*****(Example)***

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

```javascript
{
  "apikey": <YOUR_API_KEY>
}
```

{% endtab %}

{% tab title="Success Response" %}

```javascript
{
    "data": [
        {
            "id": "651d0e5d8248d002ea08a231",
            "requester": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
            "target": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
            "resource_amount": 100000,
            "resource_type": "ENERGY",
            "remain_amount": 100000,
            "price": 45,
            "duration": 259200,
            "allow_partial_fill": false,
            "payout_amount": 4500000,
            "fulfilled_percent": 0
        },
        {
            "id": "651d2306e55c073f6ca0992e",
            "requester": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
            "target": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
            "resource_amount": 100000,
            "resource_type": "ENERGY",
            "remain_amount": 0,
            "price": 67.5,
            "duration": 3600,
            "allow_partial_fill": true,
            "payout_amount": 6750000,
            "fulfilled_percent": 100
        }
    ],
    "total": 2
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tronsave.io/chinese/developer/rest-api-v0/buy-on-rest-api/use-api-key/get-internal-account-order-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
