Traffic Query API
Query account available traffic, used traffic, and traffic usage records.
Traffic Query API
This document describes how to query your account's traffic status and historical usage records.
1. Query Account Traffic Overview
Used to retrieve the account's available traffic, used traffic, and total quota.
Endpoint Information
- URL:
/api/v1/dashboard/asset - Method:
GET - Authentication: Requires
Authorization: Bearer <Your-Token>in the Header or authentication via Cookies.
Response Example
{
"code": 200,
"msg": "success",
"data": {
"totalTraffic": 188978561024,
"dynamicTraffic": 188944515072,
"balance": 0.00,
"currency": "USD"
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
totalTraffic | number | Total traffic quota (Unit: Byte) |
dynamicTraffic | number | Current available traffic (Unit: Byte) |
balance | number | Account balance |
currency | string | Currency unit |
[!TIP] Traffic Used is calculated as:
totalTraffic - dynamicTraffic.
2. Query Traffic Usage Records
Query the history of traffic acquired by the account, with support for pagination and type filtering.
Endpoint Information
- URL:
/api/v1/user/traffic/records - Method:
GET - Authentication: Requires
Authorization: Bearer <Your-Token>.
Request Parameters (Query)
| Parameter | Type | Required | Description |
|---|---|---|---|
pageNo | number | No | Page number, default is 1 |
pageSize | number | No | Number of items per page, default is 10 |
sourceType | string | No | Filter type: order (purchase records), sign (check-in rewards) |
Response Example
{
"code": 200,
"msg": "success",
"data": {
"records": [
{
"id": "123456",
"orderId": "ORD-7890",
"sourceType": "order",
"traffic": 1073741824,
"trafficUsed": 524288,
"createTime": "2026-02-21 20:00:00",
"expireTime": "2026-03-21 20:00:00",
"status": 1
}
],
"total": 1
}
}
Response Parameters (Record Object)
| Parameter | Type | Description |
|---|---|---|
orderId | string | Order ID or Task ID |
traffic | number | Total quota for this record (Unit: Byte) |
trafficUsed | number | Traffic consumed for this record (Unit: Byte) |
sourceType | string | Source: order for purchase, sign for check-in |
status | number | Status: 1 for Active, 0 for Expired/Invalid |
createTime | string | Creation time |
expireTime | string | Expiration time |