# Query Traffic Usage Records

### Basic Information

**Interface Description:** Get your wallet balance through the interface

**Interface URL:** <https://openapi.thordata.com/api/account/usage-statistics>

**Request Method:** <mark style="color:green;">GET</mark>

### Request parameters

**Params：**

| Parameter name | Type   | Required | Describe                                                                                                                                  |
| -------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `token`        | string | Yes      | Please log in to the  [**Dashboard-MENU-My Account**](https://dashboard.thordata.com/account-settings) to view your token parameter value |
| `from_date`    | string | Yes      | Start query date, format: yyyy-mm-dd                                                                                                      |
| `to_date`      | string | Yes      | End query date, format: yyyy-mm-dd                                                                                                        |

### Response example

```json
{
    "code": 200,
    "data": {
        "total_usage_traffic": 1500000,
        "traffic_balance": 10000000,
        "query_days": 3,
        "range_usage_traffic": 1500000,
        "data": [
            {
                "date": "2025-01-01",
                "usage_traffic": 500000
            },
            {
                "date": "2025-01-02",
                "usage_traffic": 500000
            },
            {
                "date": "2025-01-03",
                "usage_traffic": 500000
            }
        ]
    },
    "msg": "ok"
}
```

{% hint style="info" %}
If the returned code value is not 200, please check the [**error code description list**](https://doc.thordata.com/interface-documentation/error-code/error-code-description) and modify it.
{% endhint %}

<table><thead><tr><th width="240">Parameter name</th><th>Type</th><th width="139">Required</th><th>Describe</th></tr></thead><tbody><tr><td><code>code</code></td><td>number</td><td>No</td><td>-</td></tr><tr><td><code>data</code></td><td>object</td><td>No</td><td>-</td></tr><tr><td><code>total_usage_traffic</code></td><td>number</td><td>Yes</td><td>Total traffic usage (kb)</td></tr><tr><td><code>traffic_balance</code></td><td>number</td><td>Yes</td><td>Remaining traffic (kb)</td></tr><tr><td><code>query_days</code></td><td>number</td><td>Yes</td><td>Query days</td></tr><tr><td><code>range_usage_traffic</code></td><td>number</td><td>Yes</td><td>Total traffic usage on query date (kb)</td></tr><tr><td><code>date</code></td><td>string</td><td>Yes</td><td>date</td></tr><tr><td><code>usage_traffic</code></td><td>number</td><td>Yes</td><td>Traffic usage on the day (kb)</td></tr><tr><td><code>msg</code></td><td>string</td><td>No</td><td>-</td></tr></tbody></table>
