Open platform balance
Description
Query the available credit balance of the current open platform account. Useful for setting balance alerts.
Data notes: Balance data may have a short delay; use the actual API response as the source of truth.
Endpoint
- Method:
GET - Path:
/open/v1/credit/balance
Credits
- Cost:
0
Prerequisites
- Use a valid API Key.
- Request headers must include
X-API-KEY,X-TIMESTAMP, andX-SIGN. - GET requests have no body; the signing payload is
X-TIMESTAMPconcatenated with an empty string.
Request parameters
No path parameters, query parameters, or request body.
Request headers
| Header | Required | Description |
|---|---|---|
X-API-KEY | Yes | Your API Key |
X-TIMESTAMP | Yes | Current 13-digit millisecond timestamp; must be within 5 minutes of server time |
X-SIGN | Yes | HMAC-SHA256 signature of X-TIMESTAMP + empty body using the app Secret |
See 「Authentication / Full call flow」 for complete signing rules.
Response fields
Fields inside the data object only:
| Field | Type | Serialized | Description |
|---|---|---|---|
balance | long | string | Total available credits |
buyBalance | long | string | Available credits from purchases |
giveBalance | long | string | Available credits from grants |
recentExpireTime | date | number / null | Expiry time of the nearest credit batch (ms timestamp); null when no credits available |
recentBalance | long | string | Credits in the nearest batch that will expire; "0" when no credits available |
Field relationships
balance = buyBalance + giveBalance.recentExpireTimeandrecentBalanceindicate when and how many credits in the nearest batch expire.- When no credits are available,
balance,buyBalance,giveBalance, andrecentBalanceare all"0", andrecentExpireTimeisnull.
cURL example (Linux/macOS)
bash
curl --location --request GET 'https://api.valuescan.ai/api/open/v1/credit/balance' \
--header 'X-API-KEY: your-api-key' \
--header 'X-TIMESTAMP: 1785110400000' \
--header 'X-SIGN: xxxxx' \
--header 'Accept: application/json'cURL example (Windows CMD)
cmd
curl --location --request GET "https://api.valuescan.ai/api/open/v1/credit/balance" ^
--header "X-API-KEY: your-api-key" ^
--header "X-TIMESTAMP: 1785110400000" ^
--header "X-SIGN: xxxxx" ^
--header "Accept: application/json"Success response example
json
{
"code": 200,
"message": "success",
"data": {
"balance": "15000",
"recentExpireTime": 1785513600000,
"recentBalance": "3000",
"buyBalance": "10000",
"giveBalance": "5000"
},
"requestId": "xxx-xxx-xxx"
}Empty balance response example
json
{
"code": 200,
"message": "success",
"data": {
"balance": "0",
"recentExpireTime": null,
"recentBalance": "0",
"buyBalance": "0",
"giveBalance": "0"
},
"requestId": "xxx-xxx-xxx"
}Common errors
| Code | Description |
|---|---|
20001 | Missing API Key |
20012 | Request timestamp expired |
20021 | Signature verification failed |
60001 | Rate limit exceeded |
70002 | OpenAPI access for the current user has been disabled |