獲取訂單詳情
POST/api/v1.0/accounts/{acc_id}/orders/detail查詢指定訂單的詳細信息。
路徑參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
acc_id | string | 是 | 業務賬戶 ID。 |
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
exchange | string | 請求體 | 是 | 交易所。查詢多個訂單時,這些訂單必須屬於同一交易所。可選值參見 命名詞典 |
order_ids | list[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."
}