余额查询API用于实时查询你的eKYCPro账户当前余额和可用的检测配额。
API 端点
GET https://api.ekycpro.com/v1/balance
请求方式
请求头
| 参数 | 必需 | 说明 |
|---|
X-API-Key | 是 | 你的 API 密钥 |
响应示例
成功响应
"reset_time": "2026-03-20T00:00:00Z"
字段说明
| 字段 | 类型 | 说明 |
|---|
status | string | 响应状态,OK表示成功 |
balance | number | 账户当前余额(美元) |
credit | number | 可用信用额度 |
used_today | number | 今日已使用额度 |
daily_limit | number | 每日限额 |
reset_time | string | 额度重置时间 |
状态码
| 状态码 | 说明 |
|---|
200 | 请求成功 |
401 | 认证失败,API 密钥无效 |
429 | 请求过于频繁 |
500 | 服务器错误,请稍后重试 |
代码示例
cURL
curl --location 'https://api.ekycpro.com/v1/balance' \
--header 'X-API-Key: YOUR_API_KEY'
Python
'https://api.ekycpro.com/v1/balance',
headers={'X-API-Key': api_key}
JavaScript
const apiKey = 'YOUR_API_KEY';
fetch('https://api.ekycpro.com/v1/balance', {
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));