GETPOST
v1.0.0stableQuery Balance
Retrieve the user balance using the token
GET | POST
/api/balanceAuth:API Key
Limit:120/minute
Request Parameters
All parameters can be passed via Query or Body
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Required | User API token Example: your_api_token_here |
Response
| Parameter | Type | Required | Description |
|---|---|---|---|
code | number | Required | Status code: 1=success, 0=failure Example: 1 |
msg | string | Required | Response message Example: 查询成功 |
time | number | Required | Server timestamp (Unix seconds) Example: 1769675945 |
data | object | Required | Response payload |
data.username | string | Required | Username Example: testuser |
data.money | number | Required | Account balance (unit: CNY) Example: 100.5 |
ysucc | string | Required | Success flag, returns "Ysucc" on success Example: Ysucc |
Response Example
{}
"code":1,
"msg":"Query successful",
"time":1769675945,
"data":
{}
,"username":"testuser",
"money":100.5
"ysucc":"Ysucc"
Error Codes
Error Codes1 defined
0Invalid token
Invalid or expired token
Response Language
Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.
Recommended Header
X-Lang: enSupported Languages
zh, en, zh-TW, vi, arAccept-Language is also supported; X-Lang takes priority. Unsupported languages fall back to English.
Code Examples
curl -X GET "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/balance?token=your_api_token_here" \
-H "X-Lang: en"Notes
- Supports both GET and POST
- Send parameters via Query or x-www-form-urlencoded
Try it in Console
Fill in the parameters below and send a request to test. Requests only go to this site's API; the URL is locked and cannot be changed, and your current login cookie is included.
https://testypro.iwai.cc/api/balance?token=your_api_token_hereLocked to this sitestringRequired
User API token