Position List
GET/api/v1.0/sim-trade/{acc_id}/positionsGet the position list (symbol, direction, quantity, cost, market value, P&L).
Parameters
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
acc_id | string | path | Yes | Business account ID |
market | int | query | No | Market filter |
Request Example
bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80303779/positions" -H "Authorization: Bearer <AccessToken>" | jqResponse Fields
Returns data.positions[].
| Field | Type | Description |
|---|---|---|
pstn_id | int64 | Position ID |
pstn_type | string | JSON enum name (values 0=long, 1=short) |
market | string | Market |
symbol | string | Symbol |
stock_name | string | Name |
qty | int64 | Quantity |
qty_avbl | int64 | Available quantity |
cost_price | number | Cost price |
buy_avg_price | number | Average buy price |
cur_price | number | Current price |
mv | string | Market value |
profit | string | P&L amount |
profit_ratio | number | P&L ratio |
unrealized_profit | string | Unrealized P&L |
realized_profit | string | Realized P&L |
today_turnover | number | Today's turnover |
today_buy_qty | int64 | Today's buy quantity |
today_sell_qty | int64 | Today's sell quantity |
today_buy_turnover | number | Today's buy turnover |
today_buy_avg_price | number | Today's average buy price |
today_sell_turnover | number | Today's sell turnover |
today_sell_avg_price | number | Today's average sell price |
today_profit | string | Today's P&L |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"positions": [
{
"pstn_id": 133969,
"pstn_type": "LONG",
"market": "HK_STOCK",
"symbol": "00700",
"stock_name": "腾讯控股",
"qty": 100,
"qty_avbl": 100,
"cost_price": 448.2,
"cur_price": 448,
"mv": "44800",
"profit": "-20",
"profit_ratio": -0.0446
}
]
}
}Error response
HTTP status remains 200. A failed request returns ret_code != 0 and an error object.
json
{
"ret_code": -3,
"ret_msg": "invalid request",
"error": {"code": "invalid_parameter", "message": "invalid request"}
}