資產餘額
此端點用於查詢已驗證用戶在所有支援幣種下的現金頭寸與資產餘額。常用於顯示投資組合摘要、下單前驗證可用資金,或後台對帳。
HTTP 請求
GET /account/v1/balance請求參數
無。
✅ 成功回應
回傳每個基礎幣種的餘額摘要,包括可用現金、未結算資金及利息明細。
回應欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
base_currency | string | 幣種代碼(如 USD、HKD、USDT) |
market_value | decimal | 資產總市值 |
cash | decimal | 現金總額,該字段已棄用,請使用cash_on_hold |
cash_on_hold | decimal | 現金總額 |
cash_withdraw | decimal | 可提現金額 |
unsett_net_amt | decimal | 未結算淨額(如凍結提現+買入手續費+賣出手續費) |
unsett_buy_amt | decimal | 未結算買單凍結金額 |
unsett_sell_amt | decimal | 未結算賣單凍結金額 |
interest_net | decimal | 淨利息(已賺-應付) |
interest_debit | decimal | 應付利息 |
interest_credit | decimal | 已賺利息 |
❌ 錯誤回應
錯誤欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
code | int | 錯誤代碼 |
message | string | 錯誤訊息(人類可讀) |
details | string | 其他錯誤資訊 |
💡 cURL 範例
bash
curl -X GET "https://{{base_url}}/account/v1/balance" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Timestamp: 1746777861334" \
-H "X-API-Signature: YOUR_GENERATED_SIGNATURE" \
-H "Content-Type: application/json"✅ 成功回應範例
bash
{
"code": 0,
"data": [
{
"base_currency": "USD",
"market_value": 12500.50,
"cash": 10000.00,
"cash_on_hold": 1500.00,
"cash_withdraw": 8500.00,
"unsett_net_amt": 1000.00,
"unsett_buy_amt": 600.00,
"unsett_sell_amt": 400.00,
"interest_net": 25.00,
"interest_credit": 30.00,
"interest_debit": 5.00
}
]
}❌ 錯誤回應範例
json
{
"code": 12010012,
"message": "Internal server error"
}
