當日訂單
該接口用於獲取當日訂單和訂單查詢。
SDK Links
Request
| HTTP Method | GET |
| HTTP URL | /v1/trade/order/today |
Parameters
Content-Type: application/json; charset=utf-8
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | string | NO | 股票代碼,使用 ticker.region 格式,例如:AAPL.US |
| status | string[] | NO | 訂單狀態 例如: status=FilledStatus&status=NewStatus |
| side | string | NO | 買賣方向 可選值: Buy - 買入Sell - 賣出 |
| market | string | NO | 市場 可選值: US - 美股HK - 港股 |
| order_id | string | NO | 訂單 ID,用於指定訂單 ID 查詢,例如:701276261045858304 |
| is_attached | bool | NO | order_id 是否為附加單,為 true 時返回附加單訂單信息 |
Request Example
Response
Response Headers
- Content-Type: application/json
Response Example
json
{
"code": 0,
"message": "success",
"data": {
"orders": [
{
"currency": "HKD",
"executed_price": "0.000",
"executed_quantity": "0",
"expire_date": "",
"last_done": "",
"limit_offset": "",
"msg": "",
"order_id": "706388312699592704",
"order_type": "ELO",
"outside_rth": "UnknownOutsideRth",
"price": "11.900",
"quantity": "200",
"side": "Buy",
"status": "RejectedStatus",
"stock_name": "東亞銀行",
"submitted_at": "1651644897",
"symbol": "23.HK",
"tag": "Normal",
"time_in_force": "Day",
"trailing_amount": "",
"trailing_percent": "",
"trigger_at": "0",
"trigger_price": "",
"trigger_status": "NOT_USED",
"updated_at": "1651644898",
"remark": "",
"limit_depth_level": 0,
"monitor_price": "",
"trigger_count": 1,
"attached_orders": [
{
"order_id": "706388312699592705",
"attached_type_display": 2,
"trigger_price": "10.500",
"quantity": "200",
"executed_qty": "0",
"status": "NewStatus",
"updated_at": "1651644898",
"withdrawn": false,
"gtd": "",
"time_in_force": "Day",
"counter_id": "",
"trigger_status": 0,
"executed_amount": "0",
"tag": 0,
"submitted_at": "1651644897",
"executed_price": "0.000",
"force_only_rth": "RTH_ONLY",
"reviewed": false,
"activate_order_type": "MIT",
"activate_rth": "RTH_ONLY",
"submit_price": ""
}
]
}
]
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | 當日訂單查詢成功 | today_orders_rsp |
| 400 | 查詢失敗,請求參數錯誤。 | None |
Schemas
today_orders_rsp
| Name | Type | Required | Description |
|---|---|---|---|
| orders | object[] | false | 订单信息 |
| ∟ order_id | string | true | 订单 ID |
| ∟ status | string | true | 订单状态 |
| ∟ stock_name | string | true | 股票名称 |
| ∟ quantity | string | true | 下单数量 |
| ∟ executed_quantity | string | true | 成交数量。 当订单未成交时为 0 |
| ∟ price | string | true | 下单价格。 当市价条件单未触发时为空字符串 |
| ∟ executed_price | string | true | 成交价。 当订单未成交时为 0 |
| ∟ submitted_at | string | true | 下单时间 |
| ∟ side | string | true | 买卖方向 可选值: Buy - 买入Sell - 卖出 |
| ∟ symbol | string | true | 股票代码,使用 ticker.region 格式,例如:AAPL.US |
| ∟ order_type | string | true | 订单类型 |
| ∟ last_done | string | true | 最近成交价格。 当订单未成交时为空字符串 |
| ∟ trigger_price | string | true | LIT / MIT 订单触发价格。当订单不是 LIT / MIT 订单为空字符串 |
| ∟ msg | string | true | 拒绝信息或备注,默认为空字符串。 |
| ∟ tag | string | true | 订单标记 可选值: Normal - 普通订单Gtc - 长期单Grey - 暗盘单 |
| ∟ time_in_force | string | true | 订单有效期类型 可选值: Day - 当日有效GTC - 撤单前有效GTD - 到期前有效 |
| ∟ expire_date | string | true | 长期单过期时间,格式为 YYYY-MM-DD, 例如:2022-12-05。<br/><br/>不是长期单时,默认为空字符串。 |
| ∟ updated_at | string | true | 最近更新时间,格式为时间戳 (秒),默认为 0。 |
| ∟ trigger_at | string | true | 条件单触发时间,格式为时间戳 (秒),默认为 0。 |
| ∟ trailing_amount | string | true | TSLPAMT 订单跟踪金额。当订单不是 TSLPAMT 订单时为空字符串。 |
| ∟ trailing_percent | string | true | TSLPPCT 订单跟踪涨跌幅。当订单不是 TSLPPCT 订单时为空字符串。 |
| ∟ limit_offset | string | true | TSLPAMT / TSLPPCT 订单指定价差。当订单不是 TSLPAMT / TSLPPCT 订单时为空字符串。 |
| ∟ trigger_status | string | true | 条件单触发状态 当订单不是条件单或条件单未触发时,触发状态为 NOT_USED 可选值: NOT_USED - 未激活 DEACTIVE - 已失效 ACTIVE - 已激活 RELEASED - 已触发 |
| ∟ currency | string | true | 结算货币 |
| ∟ outside_rth | string | true | 是否允许盘前盘后 当订单不是美股时,默认为 UnknownOutsideRth 可选值: RTH_ONLY - 不允许盘前盘后ANY_TIME - 允许盘前盘后OVERNIGHT - 夜盘" |
| ∟ remark | string | true | 備註 |
| ∟ limit_depth_level | int32 | true | 指定買賣檔位 |
| ∟ monitor_price | string | true | 監控價格 |
| ∟ trigger_count | int32 | true | 觸發次數 |
| ∟ attached_orders | object[] | false | 附加訂單詳情列表 |
| ∟∟ order_id | string | true | 附加訂單 ID |
| ∟∟ attached_type_display | int32 | true | 附加訂單類型。可選值: 1 - 止盈 2 - 止損 |
| ∟∟ trigger_price | string | true | 觸發價格 |
| ∟∟ quantity | string | true | 下單數量 |
| ∟∟ executed_qty | string | true | 成交數量 |
| ∟∟ status | string | true | 訂單狀態 |
| ∟∟ updated_at | string | true | 最近更新時間,格式為時間戳 (秒) |
| ∟∟ withdrawn | boolean | true | 是否已撤銷 |
| ∟∟ gtd | string | true | GTD 到期日期,格式為 YYYY-MM-DD |
| ∟∟ time_in_force | string | true | 訂單有效期類型 可選值: Day - 當日有效GTC - 撤單前有效GTD - 到期前有效 |
| ∟∟ counter_id | string | true | 對應單 ID |
| ∟∟ trigger_status | int32 | true | 附加單激活後的條件單觸發狀態。0 - 未激活 1 - 監控中 2 - 已撤單 4 - 已觸發 |
| ∟∟ executed_amount | string | true | 成交金額 |
| ∟∟ tag | int32 | true | 訂單標記 |
| ∟∟ submitted_at | string | true | 下單時間,格式為時間戳 (秒) |
| ∟∟ executed_price | string | true | 成交價格 |
| ∟∟ force_only_rth | string | true | 是否僅正常交易時段執行。 |
| ∟∟ reviewed | boolean | true | 是否已審核 |
| ∟∟ activate_order_type | string | true | 觸發後提交的訂單類型,例如 LIT(限價單)或 MIT(市價單) |
| ∟∟ activate_rth | string | true | 觸發後提交訂單是否允許盤前盤後。 |
| ∟∟ submit_price | string | true | 委託價格 |