Skip to content

持仓列表

GET /api/v1.0/sim-trade/{acc_id}/positions

获取持仓列表(代码、方向、数量、成本、市值、盈亏)。

请求参数

参数类型位置必填说明
acc_idstringpath业务账户 ID
marketintquery市场过滤

请求示例

bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80303779/positions" | jq

响应字段

返回 data.positions[]

字段类型说明
pstn_idstring持仓 ID
pstn_typeint0=多仓 1=空仓
marketint市场
symbolstring代码
stock_namestring名称
qtystring数量
qty_avblstring可用数量
cost_pricestring成本价
buy_avg_pricestring均买价
cur_pricestring现价
mvstring市值
profitstring盈亏额
profit_ratiostring盈亏比

响应示例

json
{
  "ret_code": 0,
  "data": {
    "positions": [
      {
        "pstn_id": "133969",
        "pstn_type": 0,
        "market": 1,
        "symbol": "00700",
        "stock_name": "腾讯控股",
        "qty": "100",
        "qty_avbl": "100",
        "cost_price": "448.2",
        "cur_price": "448",
        "mv": "44800",
        "profit": "-20",
        "profit_ratio": "-0.0446"
      }
    ]
  }
}