# Get history

To use this feature you must have the API key. Read [here](broken://pages/GfKv0bUp3AY62NRSMDOW) to view how to get our API key.

## Link API Postman

## History

Get many orders sorted by created time. Default: return 10 newest orders

<mark style="color:blue;">`GET`</mark> `https://api.tronsave.io/v0/fast-charge-order-history`

Get your history by [API key](broken://pages/GfKv0bUp3AY62NRSMDOW)

Rate limi&#x74;***: 1** request per **2** seconds*

**Headers**

<table><thead><tr><th width="131"> Name</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>apikey<mark style="color:red;">*</mark></td><td>String</td><td>Tronsave API key that present for the internal account</td></tr></tbody></table>

**Query Parameters**

<table><thead><tr><th width="131"> Name</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>from</td><td>String</td><td>Start time in milliseconds</td></tr><tr><td>to</td><td>String</td><td>End time in milliseconds</td></tr><tr><td>page</td><td>Integer</td><td>start from 0. Default:0</td></tr><tr><td>pageSize</td><td>Integer</td><td>default: 10</td></tr></tbody></table>

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

```java
{
    "total": number,
    "results": [
        {
            "_id": string, // id of order
            "receiver": string, // the address that is received resource 
            "resource_type": string, // the amount type is "ENERGY",
            "amount": number, // the amount of resource
            "options": {
                "deadline": number, //Maximum matching time in seconds. Exceeding it cancels the order and refunds.
                "max_price_accept": number, //Only create an order when the estimated price is less than this value.
            },
            "charge_amount": number, // Total payout estimated of this order
            "status": string, // status of this order
            "requester": string, // the address represents for order owner
            "unit_price": number, // price unit is equal to sun
            "is_matched": boolean, // matched status of this order
            "charge_duration_sec": number, // rent duration, duration unit is equal to second
            "delegate_amount_in_sun": number //The amount of resource was delegated
            "delegate_txid": string, //on-chain delegate transaction
            "delegator": string, // The address that delegates resource for the target address
            "paid_amount_actual": number, //Actual amount TRX to be paid for this order
            "repay_amount": number, //The refunded amount is directly added to the internal account.
            ....
        }
    ]
}
```

{% endtab %}
{% endtabs %}

***Example***

<mark style="color:blue;">`GET`</mark> `https://api.tronsave.io/v0/fast-charge-order-history?from=1732066773000&to=1732073973000&page=0&pageSize=10`

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

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

{% endtab %}

{% tab title="Success Response" %}

```java
{
    "total": 1,
    "results": [
        {
            "_id": "673d586ad2451e67c4d0943b",
            "receiver": "TQk2eKHE9ZfCdVmyPnh8DfRMUF5b123456",
            "resource_type": "ENERGY",
            "amount": 65000,
            "options": {
                "deadline": 300,
                "max_price_accept": 50
            },
            "charge_amount": 4485000,
            "status": "Completed",
            "pay_txid": "internal_fast_charge_673d586ad2451e67c4d0943a",
            "request_id": "673d586ad2451e67c4d0943a",
            "requester": "TLoE6dE6EaEfeH6pbWHrtcTfMLtk111111",
            "unit_price": 69,
            "is_matched": true,
            "charge_duration_sec": 900,
            "scan_times": 1,
            "created_at": "2024-11-20T03:32:58.722Z",
            "update_at": "2024-11-20T03:34:43.815Z",
            "delegate_amount_in_sun": 881000000,
            "delegate_at": "2024-11-20T03:33:37.538Z",
            "delegate_txid": "ed287d774bbe2e673fc938feb9a02bc926bc82198ef02292212132aec4951821",
            "delegator": "TQBV7xU489Rq8ZCsYi72zBhJMdr2222222",
            "expire_delegate_at": "2024-11-20T03:38:37.530Z",
            "matched_resource_order_id": "673d58d3d2451e67c4d09440",
            "paid_amount_actual": 4127500,
            "repay_amount": 357500,
            "repay_at": "2024-11-20T03:34:43.815Z",
            "repay_by": "Confirmed",
            "repay_txid": "673d58d3d2451e67c4d09441",
            "resource_order_request_id": "673d58d3d2451e67c4d0943f"
        }
    ]
}
```

{% 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/developer/fast-charge-api/get-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.
