# Buyer list orders

{% hint style="info" %}
**Whitelist Required**\
Please log in to TronSave and send your wallet address to our support team so we can add it to the whitelist. After being whitelisted, you can use the API Key generated from that wallet address to call this API.

Contact support via Telegram: [**@wantingtrx**](https://t.me/wantingtrx)
{% endhint %}

## Get all order history by API key (Whitelist)

<mark style="color:$primary;">`GET`</mark>&#x20; `https://api.tronsave.io/v2/internal/buyer/orders`

Rate limi&#x74;***: 15** requests per **1** second*

**Headers**

<table><thead><tr><th width="149">Name</th><th width="114">Type</th><th>Descrition</th></tr></thead><tbody><tr><td>apikey<mark style="color:red;">*</mark></td><td>String</td><td>TronSave API Key (must belong to a whitelisted address)<br><a href="/pages/P9Vlqi4z2A4mPKeQOEyJ">Get API key</a></td></tr></tbody></table>

**Query parameters**

<table><thead><tr><th width="147">Name</th><th width="105">Type</th><th>Description</th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td>startTimestamp</td><td>number</td><td>Timestamp in seconds: start of the time range to filter orders.</td><td></td><td></td></tr><tr><td>endTimestamp</td><td>number</td><td>Timestamp in seconds: end of the time range to filter orders.</td><td></td><td></td></tr><tr><td>pageSize</td><td>number</td><td>Number of records per page. (Default: 20, Maximum: 20)</td><td></td><td></td></tr><tr><td>cursor</td><td>string</td><td>Pagination cursor. Use <code>nextCursor</code> to go forward, <code>prevCursor</code> to go backward. (Omit to fetch the first page.)</td><td></td><td></td></tr><tr><td>direction</td><td>string</td><td><ul><li>Only needed when navigating <strong>backward</strong>. Pass <code>direction=prev</code> together with <code>cursor=prevCursor</code></li><li>To go forward, just pass <code>cursor=nextCursor</code> — no <code>direction</code> needed.</li></ul></td><td></td><td></td></tr></tbody></table>

**Response**

```javascript
{
    "error": false,
    "message": "Success",
    "data": {
        "startTimestamp": number,// Start of the time range to filter orders.
        "endTimestamp": number,// End of the time range to filter orders.
        "data": [
        {
          "id": string,//Order identifier — use as orderId in Step 2
          "receiver": string,//TRON address that receives the delegated resource
          "resourceAmount": number, // the amount of resource
          "resourceType": string, // the resource type is "ENERGY" or "BANDWIDTH"
          "remainAmount": number,// the remaining amount can be matched by the system
          "orderType":  string, // type of order is "NORMAL" or "EXTEND"
          "price": number, // price unit is equal to SUN
          "durationSec": number, // rent duration, duration unit is equal to seconds
          "status": string, // the order status, either Active or Completed
          "allowPartialFill": boolean, //Allow the order to be filled partially or not
          "payoutAmount": number, // Total payout of this order (SUN)
          "fulfilledPercent":  number, //The percent that shows filling processing. 0-100
          "smartMatching": {object}, // Contains smart matching details (order count, matched amount, and refund amount)
          "totalMergeInfo": {object}, // Contains merge summary (merged amount and merged TRX)
          "extendInfo": [], // Lists extend delegation records (delegator, amount, payout, etc.)
          "createdAt": 1778467289
        }
      ],
        "pageSize": number, // Number of records per page
        "prevCursor": string, // Pass as cursor with direction=prev to fetch the previous page.
        "nextCursor": string // Pass as cursor to fetch the next page. null when there are no more pages ahead.
    }
}
```

**Example**

* ***Headers***

<table><thead><tr><th width="274">KEY</th><th>VALUE</th></tr></thead><tbody><tr><td>apikey</td><td>YOUR_API_KEY</td></tr></tbody></table>

* ***Query Params***

| KEY            | VALUE                       |
| -------------- | --------------------------- |
| startTimestamp | 1778236532                  |
| endTimestamp   | 1779349961                  |
| pageSize       | 2                           |
| cursor         | af28gmn9vIINZjkQk46sf-bkhEM |

* ***Response***

```javascript
{
    "error": false,
    "message": "Success",
    "data": {
        "startTimestamp": 1777507200,
        "endTimestamp": 1779349961,
        "data": [
            {
                "id": "6a0eb6708f648f498632acee",
                "receiver": "TFwUFWr3QV376677Z8VWXxGUAMFSrq1111",
                "resourceAmount": 66666,
                "resourceType": "ENERGY",
                "remainAmount": 0,
                "orderType": "NORMAL",
                "price": 65,
                "durationSec": 900,
                "status": "Completed",
                "allowPartialFill": false,
                "payoutAmount": 4333290,
                "fulfilledPercent": 100,
                "createdAt": 1779349104
            },
            {
                "id": "6a02e2a5302419258a85d524",
                "receiver": "TUP4FoZGxFZTXzCPZmfuKdGniB8J8eAAAA",
                "resourceAmount": 1000,
                "resourceType": "BANDWIDTH",
                "remainAmount": 0,
                "orderType": "NORMAL",
                "price": 600,
                "durationSec": 900,
                "status": "Completed",
                "allowPartialFill": false,
                "payoutAmount": 600000,
                "fulfilledPercent": 100,
                "createdAt": 1778573989
            }
        ],
        "pageSize": 2,
        "prevCursor": "af28gmn9vIINZjkQk46sf-bkhEM",
        "nextCursor": "af28dGn9vHQNZjkQk46sfUTFQXU"
    }
}
```


---

# 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/developer/buy-resources-v2/use-api-key/buyer-list-orders.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.
