跳转到主要内容
GET
/
balance
Account balance and trading status
curl --request GET \
  --url https://csboard.com/v1/balance \
  --header 'Authorization: Bearer <token>'
{
  "currency": "USD",
  "balance_usd": 1240.55,
  "trading_enabled": true,
  "settled_balance_usd": 980.1,
  "held_usd": 260.45,
  "held_until": "2026-07-06T12:00:00Z"
}
balance 端点返回您当前以美元计的余额,以及对自动化购买至关重要的明细:有多少是已结算(不可撤销且可用于不可撤销购买)的,以及当前有多少处于冻结状态。请使用 trading_enabled 在尝试下单之前确认该密钥已开启购买功能。 需要身份验证。 请将密钥作为 Authorization: Bearer csb_pub_... 发送。

参数

此端点不接受任何查询参数。

响应字段

currency
string
必填
始终为 "USD"。所有金额均以美元计价。
balance_usd
number
必填
您以美元计的总余额。
trading_enabled
boolean
必填
此 API 密钥是否启用了购买功能。如果为 false,购买端点将返回 trading_not_enabled
settled_balance_usd
number
必填
您余额中已结算且不可撤销的部分。这部分余额可用于不可撤销的购买,例如 POST /v1/market/buy
held_usd
number
必填
您余额中当前处于冻结状态的部分。
held_until
datetime | null
必填
冻结部分解冻时的 ISO 8601 时间戳;如果没有冻结金额,则为 null

示例请求

curl https://csboard.com/v1/balance \
  -H "Authorization: Bearer csb_pub_..."

示例响应

{
  "currency": "USD",
  "balance_usd": 1240.55,
  "trading_enabled": true,
  "settled_balance_usd": 980.10,
  "held_usd": 260.45,
  "held_until": "2026-07-06T12:00:00Z"
}

错误代码

HTTP 状态码代码含义
401missing_api_key / invalid_api_keyAPI 密钥缺失或无效。
429rate_limit_exceeded请求过多。请按照 Retry-After 响应头中的秒数退避。
在调用不可撤销的购买端点之前,请检查 settled_balance_usd 而非 balance_usd——冻结资金无法用于此类购买。

授权

Authorization
string
header
必填

Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile.

响应

Current balance and trading status.

currency
string
必填
示例:

"USD"

balance_usd
number
必填

Total balance in USD.

trading_enabled
boolean
必填

Whether buying is enabled for this key.

settled_balance_usd
number
必填

Portion of the balance that is settled (reversal-safe) and spendable on reversal-safe purchases.

held_usd
number
必填

Portion of the balance currently held.

held_until
string<date-time> | null
必填

When the held portion clears, or null if nothing is held.