账户列表
GET/api/v1.0/sim-trade/accounts获取当前登录用户的模拟交易业务账户列表。首次调用时后端自动创建账户。返回的 account_id 用于后续所有交易接口的路径参数。
请求参数
无入参。uid 由登录态 header 自动透传。
请求示例
bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/accounts" | jq响应字段
返回 data.accounts[],每元素一个模拟账户。
| 字段 | 类型 | 说明 |
|---|---|---|
account_id | string | 业务账户 ID(后续接口的 acc_id) |
broker_id | int | 券商 ID |
market_id | int | 市场 ID(1=HK 2=US 3=US_OPTION 9=HKCC 18=CA) |
intra_account_id | int | 内部账户短号 |
account_type | int | 账户类型 |
account_title | string | 账户名称 |
响应示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"accounts": [
{
"account_id": "80303779",
"broker_id": 0,
"market_id": 1,
"intra_account_id": 0,
"account_type": 0,
"account_title": "港股模拟账户"
}
]
}
}