獲取賬戶資金
GET/api/v1.0/accounts/{acc_id}/funds查詢交易業務賬戶的淨資產值、證券市值、現金、購買力等資金數據。
路徑參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
acc_id | string | 是 | 業務賬戶 ID。 |
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
currency | string | 查詢 | 是 | 資金展示幣種。僅適用於期貨賬戶和綜合證券賬戶,其他賬戶類型忽略此參數。返回數據中除明確標明幣種的字段外,其他資金字段均按此參數折算。 |
請求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/accounts/{acc_id}/funds' \
-H 'Authorization: Bearer <AccessToken>' | jq響應參數
| 字段 | 類型 | 說明 |
|---|---|---|
power | string | 最大購買力。 |
max_power_short | string | 做空購買力。 |
total_assets | string | 總淨資產。 |
securities_assets | string | 證券資產。 |
funds_assets | string | 基金資產。 |
cash | string | 現金。 |
market_val | string | 證券市值。 |
long_mv | string | 多頭市值。 |
short_mv | string | 空頭市值。 |
pending_asset | string | 在途資產。 |
frozen_cash | string | 凍結資金。 |
max_withdrawal | string | 最大可提現金額。 |
currency | string | 本次查詢使用的幣種。 |
available_funds | string | 可用資金。 |
unrealized_pl | string | 未實現盈虧。 |
realized_pl | string | 已實現盈虧。 |
risk_status | string | 風險狀態。可選值:NONE、LEVEL1-LEVEL9。 |
initial_margin | string | 初始保證金。 |
margin_call_margin | string | 追保保證金。 |
maintenance_margin | string | 維持保證金。 |
hk_cash | string | 港幣現金。 |
hk_avl_withdrawal_cash | string | 港幣可提現金額。 |
hk_net_cash_power | string | 港幣現金購買力。 |
us_cash | string | 美元現金。 |
us_avl_withdrawal_cash | string | 美元可提現金額。 |
us_net_cash_power | string | 美元現金購買力。 |
jp_cash | string | 日元現金。 |
jp_avl_withdrawal_cash | string | 日元可提現金額。 |
jp_net_cash_power | string | 日元現金購買力。 |
cn_cash | string | 人民幣現金。 |
cn_avl_withdrawal_cash | string | 人民幣可提現金額。 |
cn_net_cash_power | string | 人民幣現金購買力。 |
sg_cash | string | 新加坡元現金。 |
sg_avl_withdrawal_cash | string | 新加坡元可提現金額。 |
sg_net_cash_power | string | 新加坡元現金購買力。 |
響應示例
json
{
"s": "ok",
"d": {
"power": "12500.00",
"max_power_short": "0.00",
"total_assets": "25000.00",
"securities_assets": "18000.00",
"funds_assets": "0.00",
"cash": "7000.00",
"market_val": "18000.00",
"long_mv": "18000.00",
"short_mv": "0.00",
"pending_asset": "0.00",
"frozen_cash": "0.00",
"max_withdrawal": "7000.00",
"currency": "USD",
"available_funds": "7000.00",
"unrealized_pl": "500.00",
"realized_pl": "200.00",
"risk_status": "LEVEL2",
"initial_margin": "0.00",
"margin_call_margin": "0.00",
"maintenance_margin": "0.00",
"hk_cash": "0.00",
"hk_avl_withdrawal_cash": "0.00",
"hk_net_cash_power": "0.00",
"us_cash": "7000.00",
"us_avl_withdrawal_cash": "7000.00",
"us_net_cash_power": "12500.00",
"jp_cash": "0.00",
"jp_avl_withdrawal_cash": "0.00",
"jp_net_cash_power": "0.00",
"cn_cash": "0.00",
"cn_avl_withdrawal_cash": "0.00",
"cn_net_cash_power": "0.00",
"sg_cash": "0.00",
"sg_avl_withdrawal_cash": "0.00",
"sg_net_cash_power": "0.00"
}
}失敗響應:
json
{
"s": "error",
"errcode": -1200,
"errmsg": "Error message."
}