BytesFlows DocsAPI Reference
Traffic Query API
Query account available traffic, used traffic, and traffic usage records.
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
json
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
json
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 |