Skip to content

获取订单详情

POST /api/v1.0/accounts/{acc_id}/orders/detail

查询指定订单的详细信息。

路径参数

参数类型必填说明
acc_idstring业务账户 ID。

请求参数

参数类型位置必填说明
exchangestring请求体交易所。查询多个订单时,这些订单必须属于同一交易所。可选值参见 命名词典
order_idslist[string]请求体订单 ID 列表。长度不超过 50。

请求示例

bash
curl -X POST 'https://webapi.moomoo.com/api/v1.0/accounts/{acc_id}/orders/detail' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <AccessToken>' \
  -d '{
    "exchange": "US",
    "order_ids": ["order_id_1", "order_id_2"]
  }' | jq

响应示例

json
{
  "s": "ok",
  "d": [
    {
      "side": "BUY",
      "order_type": "LIMIT",
      "order_status": "FILLED_ALL",
      "order_id": "2024030100000001",
      "code": "US.AAPL",
      "stock_name": "Apple Inc.",
      "security_type": "STOCK",
      "qty": "100",
      "price": "180.000",
      "currency": "USD",
      "create_time": 1709251200000000,
      "updated_time": 1709251210000000,
      "dealt_qty": "100",
      "dealt_avg_price": "180.000",
      "last_err_msg": "",
      "remark": "",
      "time_in_force": "DAY",
      "session": "RTH",
      "aux_price": "0.000",
      "trail_type": "NONE",
      "trail_value": "0.000",
      "trail_spread": "0.000"
    }
  ]
}

失败响应:

json
{
  "s": "error",
  "errcode": -1200,
  "errmsg": "Error message."
}