diff --git a/.vscode/settings.json b/.vscode/settings.json index ed460b83..13376047 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -27,7 +27,6 @@ "source.fixAll.eslint": "explicit", "source.fixAll.stylelint": "explicit" }, - "editor.formatOnSave": true, "autocorrect.enable": true, "autocorrect.formatOnSave": true, "[markdown]": { diff --git a/docs/en/docs/trade/order/history_orders.md b/docs/en/docs/trade/order/history_orders.md index 1b859ff0..652c2551 100644 --- a/docs/en/docs/trade/order/history_orders.md +++ b/docs/en/docs/trade/order/history_orders.md @@ -283,7 +283,32 @@ func main() { "remark": "", "limit_depth_level": 0, "monitor_price": "", - "trigger_count": 1 + "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": "" + } + ] } ] } @@ -340,3 +365,25 @@ func main() { | ∟ limit_depth_level | int32 | true | Specifies the bid/ask depth level | | ∟ monitor_price | string | true | Monitoring price | | ∟ trigger_count | int32 | true | Number of triggers | +| ∟ attached_orders | object[] | false | List of attached order details | +| ∟∟ order_id | string | true | Attached order ID | +| ∟∟ attached_type_display | int32 | true | Attached order type.

**Enum Value:**
`1` - Take Profit
`2` - Stop Loss | +| ∟∟ trigger_price | string | true | Trigger price | +| ∟∟ quantity | string | true | Order quantity | +| ∟∟ executed_qty | string | true | Executed quantity | +| ∟∟ status | string | true | Order status | +| ∟∟ updated_at | string | true | Last updated time, formatted as a timestamp (second) | +| ∟∟ withdrawn | boolean | true | Whether the order has been withdrawn | +| ∟∟ gtd | string | true | GTD expiration date, format: `YYYY-MM-DD` | +| ∟∟ time_in_force | string | true | Time in force Type

**Enum Value:**
`Day` - Day Order
`GTC` - Good Til Canceled Order
`GTD` - Good Til Date Order | +| ∟∟ counter_id | string | true | Counter order ID | +| ∟∟ trigger_status | int32 | true | Conditional order trigger status after the attached order is activated.
`0` - Not activated
`1` - Monitoring
`2` - Cancelled
`4` - Triggered | +| ∟∟ executed_amount | string | true | Executed amount | +| ∟∟ tag | int32 | true | Order tag | +| ∟∟ submitted_at | string | true | Submitted time, formatted as a timestamp (second) | +| ∟∟ executed_price | string | true | Executed price | +| ∟∟ force_only_rth | string | true | Whether execution is restricted to regular trading hours only | +| ∟∟ reviewed | boolean | true | Whether the order has been reviewed| +| ∟∟ activate_order_type | string | true | Order type submitted after triggering, e.g. `LIT` (limit-if-touched) or `MIT` (market-if-touched) | +| ∟∟ activate_rth | string | true | Whether the order submitted after triggering allows pre/post market trading | +| ∟∟ submit_price | string | true | Submitted price | diff --git a/docs/en/docs/trade/order/order_detail.md b/docs/en/docs/trade/order/order_detail.md index 7a18ee62..64053d1a 100644 --- a/docs/en/docs/trade/order/order_detail.md +++ b/docs/en/docs/trade/order/order_detail.md @@ -32,9 +32,10 @@ longbridge order detail 693664675163312128 > Content-Type: application/json; charset=utf-8 -| Name | Type | Required | Description | -| -------- | ------ | -------- | ------------------------------------------------------------------------- | -| order_id | string | YES | Order ID for specifying order ID query, for example: `701276261045858304` | +| Name | Type | Required | Description | +| ----------- | ------ | -------- | ------------------------------------------------------------------------- | +| order_id | string | YES | Order ID for specifying order ID query, for example: `701276261045858304` | +| is_attached | bool | NO | Whether `order_id` refers to an attached order | ### Request Example @@ -50,6 +51,7 @@ ctx = TradeContext(config) resp = ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) ``` @@ -68,6 +70,7 @@ async def main() -> None: resp = await ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) @@ -303,7 +306,32 @@ func main() { ], "total_amount": "0", "currency": "USD" - } + }, + "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": "" + } + ] } } ``` @@ -381,6 +409,28 @@ Order Information | ∟∟∟ name | string | true | Charge name | | ∟∟∟ amount | string | true | Charge amount | | ∟∟∟ currency | string | true | Charge currency | -| ∟∟∟ limit_depth_level | int32 | true | Specifies the bid/ask depth level | -| ∟∟∟ monitor_price | string | true | Monitoring price | -| ∟∟∟ trigger_count | int32 | true | Number of triggers | +| ∟ limit_depth_level | int32 | true | Specifies the bid/ask depth level | +| ∟ monitor_price | string | true | Monitoring price | +| ∟ trigger_count | int32 | true | Number of triggers | +| ∟ attached_orders | object[] | false | List of attached order details | +| ∟∟ order_id | string | true | Attached order ID | +| ∟∟ attached_type_display | int32 | true | Attached order type.

**Enum Value:**
`1` - Take Profit
`2` - Stop Loss | +| ∟∟ trigger_price | string | true | Trigger price | +| ∟∟ quantity | string | true | Order quantity | +| ∟∟ executed_qty | string | true | Executed quantity | +| ∟∟ status | string | true | Order status | +| ∟∟ updated_at | string | true | Last updated time, formatted as a timestamp (second) | +| ∟∟ withdrawn | boolean | true | Whether the order has been withdrawn | +| ∟∟ gtd | string | true | GTD expiration date, format: `YYYY-MM-DD` | +| ∟∟ time_in_force | string | true | Time in force Type

**Enum Value:**
`Day` - Day Order
`GTC` - Good Til Canceled Order
`GTD` - Good Til Date Order | +| ∟∟ counter_id | string | true | Counter order ID | +| ∟∟ trigger_status | int32 | true | Conditional order trigger status after the attached order is activated.
`0` - Not activated
`1` - Monitoring
`2` - Cancelled
`4` - Triggered | +| ∟∟ executed_amount | string | true | Executed amount | +| ∟∟ tag | int32 | true | Order tag | +| ∟∟ submitted_at | string | true | Submitted time, formatted as a timestamp (second) | +| ∟∟ executed_price | string | true | Executed price | +| ∟∟ force_only_rth | string | true | Whether execution is restricted to regular trading hours only | +| ∟∟ reviewed | boolean | true | Whether the order has been reviewed | +| ∟∟ activate_order_type | string | true | Order type submitted after triggering, e.g. `LIT` (limit-if-touched) or `MIT` (market-if-touched) | +| ∟∟ activate_rth | string | true | Whether the order submitted after triggering allows pre/post market trading | +| ∟∟ submit_price | string | true | Submitted price | diff --git a/docs/en/docs/trade/order/replace.md b/docs/en/docs/trade/order/replace.md index d14aaa9f..194c38b3 100644 --- a/docs/en/docs/trade/order/replace.md +++ b/docs/en/docs/trade/order/replace.md @@ -45,6 +45,22 @@ longbridge order replace 693664675163312128 --qty 200 --price 255.00 | limit_depth_level | int32 | NO | Specifies the bid/ask depth level. `TSLPAMT` / `TSLPPCT` Order Required | | monitor_price | string | NO | Monitoring price. `TSLPAMT` / `TSLPPCT` Order Required | | trigger_count | int32 | NO | Number of triggers. `LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` Order Required | +| attached_params | object | NO | Attached order parameters (take-profit / stop-loss) | +| attached_params.attached_order_type | string | NO | Attached order type

**Enum Value:**
`PROFIT_TAKER` - Take Profit
`STOP_LOSS` - Stop Loss
`BRACKET` - Bracket Order | +| attached_params.profit_taker_price | string | NO | Take-profit trigger price | +| attached_params.stop_loss_price | string | NO | Stop-loss trigger price | +| attached_params.time_in_force | string | NO | Attached order time in force type

**Enum Value:**
`Day` - Day Order
`GTC` - Good Til Canceled Order
`GTD` - Good Til Date Order (inherits the main order's `expire_date` in this case) | +| attached_params.expire_time | int64 | NO | Expire time (Unix timestamp, in seconds) | +| attached_params.profit_taker_id | int64 | NO | Take-profit order ID, fill in when modifying an existing take-profit order | +| attached_params.stop_loss_id | int64 | NO | Stop-loss order ID, fill in when modifying an existing stop-loss order | +| attached_params.cancel_all_attached | bool | NO | Whether to cancel all attached orders | +| attached_params.main_id | int64 | NO | Main order ID | +| attached_params.quantity | string | NO | Attached order quantity | +| attached_params.market_price | string | NO | Market price | +| attached_params.activate_order_type | string | NO | Order type submitted after triggering, e.g. `LIT` (limit-if-touched) or `MIT` (market-if-touched) | +| attached_params.profit_taker_submit_price | string | NO | Take-profit limit order submitted price, required when `activate_order_type` is `LIT` | +| attached_params.stop_loss_submit_price | string | NO | Stop-loss limit order submitted price, required when `activate_order_type` is `LIT` | +| attached_params.activate_rth | string | NO | Whether the order submitted after triggering allows pre/post market trading

**Enum Value:**
`RTH_ONLY` - Regular trading hours only
`ANY_TIME` - Any time | ### Request Example diff --git a/docs/en/docs/trade/order/submit.md b/docs/en/docs/trade/order/submit.md index f64a95b2..ed8cfd17 100644 --- a/docs/en/docs/trade/order/submit.md +++ b/docs/en/docs/trade/order/submit.md @@ -51,6 +51,16 @@ longbridge order sell TSLA.US 100 --price 260.00 | monitor_price | string | NO | Monitoring price.
Monitoring starts only after reaching this price, updating the reference price.
Valid for `TSLPAMT` / `TSLPPCT` orders. | | trigger_count | int32 | NO | Number of triggers. Value range is 0 ~ 3.
Specifies that within 1 minute, the order will only be placed after being triggered multiple times.
Valid for `LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` orders. | | client_request_id | string | NO | Idempotent request ID for preventing duplicate order submissions. The server caches this request ID for 10 minutes. If a request with the same ID is received within this period, it returns the same response without creating a duplicate order. Must be a unique identifier (e.g., UUID). | +| attached_params | object | NO | Attached order parameters (take-profit / stop-loss) | +| attached_params.attached_order_type | string | NO | Attached order type

**Enum Value:**
`PROFIT_TAKER` - Take Profit
`STOP_LOSS` - Stop Loss
`BRACKET` - Bracket Order | +| attached_params.profit_taker_price | string | NO | Take-profit trigger price | +| attached_params.stop_loss_price | string | NO | Stop-loss trigger price | +| attached_params.time_in_force | string | NO | Attached order time in force type

**Enum Value:**
`Day` - Day Order
`GTC` - Good Til Canceled Order
`GTD` - Good Til Date Order (inherits the main order's `expire_date` in this case) | +| attached_params.expire_time | int64 | NO | Expire time (Unix timestamp, in seconds) | +| attached_params.activate_order_type | string | NO | Order type submitted after triggering, e.g. `LIT` (limit-if-touched) or `MIT` (market-if-touched) | +| attached_params.profit_taker_submit_price | string | NO | Take-profit limit order submitted price, required when `activate_order_type` is `LIT` | +| attached_params.stop_loss_submit_price | string | NO | Stop-loss limit order submitted price, required when `activate_order_type` is `LIT` | +| attached_params.activate_rth | string | NO | Whether the order submitted after triggering allows pre/post market trading

**Enum Value:**
`RTH_ONLY` - Regular trading hours only
`ANY_TIME` - Any time | ### Idempotency diff --git a/docs/en/docs/trade/order/today_orders.md b/docs/en/docs/trade/order/today_orders.md index 9481e1c3..18936af6 100644 --- a/docs/en/docs/trade/order/today_orders.md +++ b/docs/en/docs/trade/order/today_orders.md @@ -38,6 +38,7 @@ longbridge order | side | string | NO | Order side

**Enum Value:**
`Buy`
`Sell` | | market | string | NO | Market

**Enum Value:**
`US` - United States of America Market
`HK` - Hong Kong Market | | order_id | string | NO | Order ID, example: `701276261045858304` | +| is_attached | bool | NO | Whether `order_id` refers to an attached order, returns the attached order information if `true` | ### Request Example @@ -272,7 +273,35 @@ func main() { "trigger_price": "", "trigger_status": "NOT_USED", "updated_at": "1651644898", - "remark": "" + "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": "" + } + ] } ] } @@ -328,3 +357,25 @@ func main() { | ∟ limit_depth_level | int32 | true | Specifies the bid/ask depth level | | ∟ monitor_price | string | true | Monitoring price | | ∟ trigger_count | int32 | true | Number of triggers | +| ∟ attached_orders | object[] | false | List of attached order details | +| ∟∟ order_id | string | true | Attached order ID | +| ∟∟ attached_type_display | int32 | true | Attached order type.

**Enum Value:**
`1` - Take Profit
`2` - Stop Loss | +| ∟∟ trigger_price | string | true | Trigger price | +| ∟∟ quantity | string | true | Order quantity | +| ∟∟ executed_qty | string | true | Executed quantity | +| ∟∟ status | string | true | Order status | +| ∟∟ updated_at | string | true | Last updated time, formatted as a timestamp (second) | +| ∟∟ withdrawn | boolean | true | Whether the order has been withdrawn | +| ∟∟ gtd | string | true | GTD expiration date, format: `YYYY-MM-DD` | +| ∟∟ time_in_force | string | true | Time in force Type

**Enum Value:**
`Day` - Day Order
`GTC` - Good Til Canceled Order
`GTD` - Good Til Date Order | +| ∟∟ counter_id | string | true | Counter order ID | +| ∟∟ trigger_status | int32 | true | Conditional order trigger status after the attached order is activated.
`0` - Not activated
`1` - Monitoring
`2` - Cancelled
`4` - Triggered | +| ∟∟ executed_amount | string | true | Executed amount | +| ∟∟ tag | int32 | true | Order tag | +| ∟∟ submitted_at | string | true | Submitted time, formatted as a timestamp (second) | +| ∟∟ executed_price | string | true | Executed price | +| ∟∟ force_only_rth | string | true | Whether execution is restricted to regular trading hours only | +| ∟∟ reviewed | boolean | true | Whether the order has been reviewed | +| ∟∟ activate_order_type | string | true | Order type submitted after triggering, e.g. `LIT` (limit-if-touched) or `MIT` (market-if-touched) | +| ∟∟ activate_rth | string | true | Whether the order submitted after triggering allows pre/post market trading | +| ∟∟ submit_price | string | true | Submitted price | diff --git a/docs/en/docs/trade/order/withdraw.md b/docs/en/docs/trade/order/withdraw.md index 5043bfb3..d84a46f5 100644 --- a/docs/en/docs/trade/order/withdraw.md +++ b/docs/en/docs/trade/order/withdraw.md @@ -35,6 +35,7 @@ longbridge order cancel 693664675163312128 | Name | Type | Required | Description | | -------- | ------ | -------- | ----------- | | order_id | string | YES | Order ID | +| is_attached | bool | NO | Whether `order_id` refers to an attached order | ### Request Example diff --git a/docs/zh-CN/docs/trade/order/history_orders.md b/docs/zh-CN/docs/trade/order/history_orders.md index 0ad17e64..5e356a62 100644 --- a/docs/zh-CN/docs/trade/order/history_orders.md +++ b/docs/zh-CN/docs/trade/order/history_orders.md @@ -282,7 +282,32 @@ func main() { "remark": "", "limit_depth_level": 0, "monitor_price": "", - "trigger_count": 1 + "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": "" + } + ] } ] } @@ -339,3 +364,25 @@ func main() { | ∟ 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 | 委托价格 | diff --git a/docs/zh-CN/docs/trade/order/order_detail.md b/docs/zh-CN/docs/trade/order/order_detail.md index fd1df185..ab808bbf 100644 --- a/docs/zh-CN/docs/trade/order/order_detail.md +++ b/docs/zh-CN/docs/trade/order/order_detail.md @@ -35,6 +35,7 @@ longbridge order detail 693664675163312128 | Name | Type | Required | Description | | -------- | ------ | -------- | --------------------------------------------------------- | | order_id | string | YES | 订单 ID,用于指定订单 ID 查询,例如:`701276261045858304` | +| is_attached | bool | NO | order_id 是否为附加单 | ### Request Example @@ -50,6 +51,7 @@ ctx = TradeContext(config) resp = ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) ``` @@ -68,6 +70,7 @@ async def main() -> None: resp = await ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) @@ -302,7 +305,32 @@ func main() { ], "total_amount": "0", "currency": "USD" - } + }, + "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": "" + } + ] } } ``` @@ -380,6 +408,28 @@ func main() { | ∟∟∟ name | string | true | 收费名称 | | ∟∟∟ amount | string | true | 单项收费金额 | | ∟∟∟ currency | string | true | 收费货币 | -| ∟∟∟ limit_depth_level | int32 | true | 指定买卖档位 | -| ∟∟∟ monitor_price | string | true | 监控价格 | -| ∟∟∟ trigger_count | int32 | 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 | 委托价格 | diff --git a/docs/zh-CN/docs/trade/order/replace.md b/docs/zh-CN/docs/trade/order/replace.md index 54277fac..a54ca328 100644 --- a/docs/zh-CN/docs/trade/order/replace.md +++ b/docs/zh-CN/docs/trade/order/replace.md @@ -45,6 +45,22 @@ longbridge order replace 693664675163312128 --qty 200 --price 255.00 | limit_depth_level | int32 | NO | 指定买卖档位,`TSLPAMT` / `TSLPPCT` 订单必填 | | monitor_price | string| NO | 监控价格,`TSLPAMT` / `TSLPPCT` 订单必填 | | trigger_count | int32 | NO | 触发次数,`LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` 订单必填 | +| attached_params | object | NO | 附加单参数(止盈止损) | +| attached_params.attached_order_type | string | NO | 附加单订单类型

**可选值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止损
`BRACKET` - 括号单 | +| attached_params.profit_taker_price | string | NO | 止盈触发价格 | +| attached_params.stop_loss_price | string | NO | 止损触发价格 | +| attached_params.time_in_force | string | NO | 附加单有效期类型

**可选值:**
`Day` - 当日有效
`GTC` - 撤单前有效
`GTD` - 到期前有效(此时继承主单 expire_date) | +| attached_params.expire_time | int64 | NO | 到期时间(Unix 时间戳,单位秒) | +| attached_params.profit_taker_id | int64 | NO | 止盈单 ID,修改现有止盈单时填写 | +| attached_params.stop_loss_id | int64 | NO | 止损单 ID,修改现有止损单时填写 | +| attached_params.cancel_all_attached | bool | NO | 是否取消所有附加单 | +| attached_params.main_id | int64 | NO | 主单 ID | +| attached_params.quantity | string | NO | 附加单数量 | +| attached_params.market_price | string | NO | 市价 | +| attached_params.activate_order_type | string | NO | 触发后提交的订单类型,例如 `LIT`(限价单)或 `MIT`(市价单) | +| attached_params.profit_taker_submit_price | string | NO | 止盈限价委托价格,`activate_order_type` 为 `LIT` 时必填 | +| attached_params.stop_loss_submit_price | string | NO | 止损限价委托价格,`activate_order_type` 为 `LIT` 时必填 | +| attached_params.activate_rth | string | NO | 触发后提交的订单是否允许盘前盘后

**可选值:**
`RTH_ONLY` - 不允许盘前盘后
`ANY_TIME` - 允许盘前盘后 | ### Request Example diff --git a/docs/zh-CN/docs/trade/order/submit.md b/docs/zh-CN/docs/trade/order/submit.md index 55ca04ac..400555ce 100644 --- a/docs/zh-CN/docs/trade/order/submit.md +++ b/docs/zh-CN/docs/trade/order/submit.md @@ -47,6 +47,16 @@ longbridge order sell TSLA.US 100 --price 260.00 | monitor_price | string | NO | 监控价格,需要达到该价格才会开始监控,更新参考价
`TSLPAMT` / `TSLPPCT` 订单有效 | | trigger_count | int32 | NO | 触发次数,取值范围 0 ~ 3, 表示在 1 分钟内触发多次才会触发订单
`LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` 订单有效 | | client_request_id | string | NO | 幂等性请求 ID,用于防止重复下单。服务器会缓存该请求 ID 10 分钟。在此期间内如果收到相同 ID 的请求,将返回原始响应而不创建重复订单。必须是唯一标识符(如 UUID)。 | +| attached_params | object | NO | 附加单参数(止盈止损) | +| attached_params.attached_order_type | string | NO | 附加单订单类型

**可选值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止损
`BRACKET` - 括号单 | +| attached_params.profit_taker_price | string | NO | 止盈触发价格 | +| attached_params.stop_loss_price | string | NO | 止损触发价格 | +| attached_params.time_in_force | string | NO | 附加单有效期类型

**可选值:**
`Day` - 当日有效
`GTC` - 撤单前有效
`GTD` - 到期前有效(此时继承主单 expire_date) | +| attached_params.expire_time | int64 | NO | 到期时间(Unix 时间戳,单位秒) | +| attached_params.activate_order_type | string | NO | 触发后提交的订单类型,例如 `LIT`(限价单)或 `MIT`(市价单) | +| attached_params.profit_taker_submit_price | string | NO | 止盈限价委托价格,`activate_order_type` 为 `LIT` 时必填 | +| attached_params.stop_loss_submit_price | string | NO | 止损限价委托价格,`activate_order_type` 为 `LIT` 时必填 | +| attached_params.activate_rth | string | NO | 触发后提交的订单是否允许盘前盘后

**可选值:**
`RTH_ONLY` - 不允许盘前盘后
`ANY_TIME` - 允许盘前盘后 | ## 幂等性 diff --git a/docs/zh-CN/docs/trade/order/today_orders.md b/docs/zh-CN/docs/trade/order/today_orders.md index aa4fa6d4..41d94126 100644 --- a/docs/zh-CN/docs/trade/order/today_orders.md +++ b/docs/zh-CN/docs/trade/order/today_orders.md @@ -38,6 +38,7 @@ longbridge order | 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 @@ -274,7 +275,32 @@ func main() { "remark": "", "limit_depth_level": 0, "monitor_price": "", - "trigger_count": 1 + "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": "" + } + ] } ] } @@ -330,3 +356,25 @@ func main() { | ∟ limit_depth_level | int32 | true | 指定买卖档位 | | ∟ trigger_count | int32 | true | 触发次数 | | ∟ monitor_price | string | 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 | 委托价格 | diff --git a/docs/zh-CN/docs/trade/order/withdraw.md b/docs/zh-CN/docs/trade/order/withdraw.md index 39fa2046..3913eadc 100644 --- a/docs/zh-CN/docs/trade/order/withdraw.md +++ b/docs/zh-CN/docs/trade/order/withdraw.md @@ -35,6 +35,7 @@ longbridge order cancel 693664675163312128 | Name | Type | Required | Description | | -------- | ------ | -------- | ----------- | | order_id | string | YES | 订单 ID | +| is_attached | bool | NO | order_id 是否为附加单 | ### Request Example diff --git a/docs/zh-HK/docs/trade/order/history_orders.md b/docs/zh-HK/docs/trade/order/history_orders.md index 798aa021..317cfc16 100644 --- a/docs/zh-HK/docs/trade/order/history_orders.md +++ b/docs/zh-HK/docs/trade/order/history_orders.md @@ -282,7 +282,32 @@ func main() { "remark": "", "limit_depth_level": 0, "monitor_price": "", - "trigger_count": 1 + "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": "" + } + ] } ] } @@ -339,3 +364,25 @@ func main() { | ∟ 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 | 委託價格 | diff --git a/docs/zh-HK/docs/trade/order/order_detail.md b/docs/zh-HK/docs/trade/order/order_detail.md index 258d7e17..bc15abd4 100644 --- a/docs/zh-HK/docs/trade/order/order_detail.md +++ b/docs/zh-HK/docs/trade/order/order_detail.md @@ -32,9 +32,10 @@ longbridge order detail 693664675163312128 > Content-Type: application/json; charset=utf-8 -| Name | Type | Required | Description | -| -------- | ------ | -------- | --------------------------------------------------------- | -| order_id | string | YES | 訂單 ID,用於指定訂單 ID 查詢,例如:`701276261045858304` | +| Name | Type | Required | Description | +| ----------- | ------ | -------- | --------------------------------------------------------- | +| order_id | string | YES | 訂單 ID,用於指定訂單 ID 查詢,例如:`701276261045858304` | +| is_attached | bool | NO | order_id 是否為附加單 | ### Request Example @@ -50,6 +51,7 @@ ctx = TradeContext(config) resp = ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) ``` @@ -68,6 +70,7 @@ async def main() -> None: resp = await ctx.order_detail( order_id = "701276261045858304", + is_attached = False, ) print(resp) @@ -302,7 +305,32 @@ func main() { ], "total_amount": "0", "currency": "USD" - } + }, + "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": "" + } + ] } } ``` @@ -380,6 +408,28 @@ func main() { | ∟∟∟ name | string | true | 收費名稱 | | ∟∟∟ amount | string | true | 單項收費金額 | | ∟∟∟ currency | string | true | 收費貨幣 | -| ∟∟∟ limit_depth_level | int32 | true | 指定買賣檔位 | -| ∟∟∟ monitor_price | string | true | 監控價格 | -| ∟∟∟ trigger_count | int32 | 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 | 委託價格 | diff --git a/docs/zh-HK/docs/trade/order/replace.md b/docs/zh-HK/docs/trade/order/replace.md index dd9cf77f..217db591 100644 --- a/docs/zh-HK/docs/trade/order/replace.md +++ b/docs/zh-HK/docs/trade/order/replace.md @@ -45,6 +45,22 @@ longbridge order replace 693664675163312128 --qty 200 --price 255.00 | limit_depth_level | int32 | NO | 指定買賣檔位,`TSLPAMT` / `TSLPPCT` 訂單必填 | | monitor_price | string | NO | 監控價格,`TSLPAMT` / `TSLPPCT` 訂單必填 | | trigger_count | int32 | NO | 觸發次數,`LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` 訂單必填 | +| attached_params | object | NO | 附加單參數(止盈止損) | +| attached_params.attached_order_type | string | NO | 附加單訂單類型

**可選值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止損
`BRACKET` - 括號單 | +| attached_params.profit_taker_price | string | NO | 止盈觸發價格 | +| attached_params.stop_loss_price | string | NO | 止損觸發價格 | +| attached_params.time_in_force | string | NO | 附加單有效期類型

**可選值:**
`Day` - 當日有效
`GTC` - 撤單前有效
`GTD` - 到期前有效(此時繼承主單 expire_date) | +| attached_params.expire_time | int64 | NO | 到期時間(Unix 時間戳,單位秒) | +| attached_params.profit_taker_id | int64 | NO | 止盈單 ID,修改現有止盈單時填寫 | +| attached_params.stop_loss_id | int64 | NO | 止損單 ID,修改現有止損單時填寫 | +| attached_params.cancel_all_attached | bool | NO | 是否取消所有附加單 | +| attached_params.main_id | int64 | NO | 主單 ID | +| attached_params.quantity | string | NO | 附加單數量 | +| attached_params.market_price | string | NO | 市價 | +| attached_params.activate_order_type | string | NO | 觸發後提交的訂單類型,例如 `LIT`(限價單)或 `MIT`(市價單) | +| attached_params.profit_taker_submit_price | string | NO | 止盈限價委託價格,`activate_order_type` 為 `LIT` 時必填 | +| attached_params.stop_loss_submit_price | string | NO | 止損限價委託價格,`activate_order_type` 為 `LIT` 時必填 | +| attached_params.activate_rth | string | NO | 觸發後提交的訂單是否允許盤前盤後

**可選值:**
`RTH_ONLY` - 不允許盤前盤後
`ANY_TIME` - 允許盤前盤後 | ### Request Example diff --git a/docs/zh-HK/docs/trade/order/submit.md b/docs/zh-HK/docs/trade/order/submit.md index 4fdcc2d4..dd92ba21 100644 --- a/docs/zh-HK/docs/trade/order/submit.md +++ b/docs/zh-HK/docs/trade/order/submit.md @@ -51,6 +51,16 @@ longbridge order sell TSLA.US 100 --price 260.00 | monitor_price | string | NO | 監控價格,需要達到該價格才會開始監控,更新參考價
`TSLPAMT` / `TSLPPCT` 訂單有效 | | trigger_count | int32 | NO | 觸發次數,取值範圍 0 ~ 3,表示在 1 分鐘內觸發多次才會觸發訂單,
`LIT` / `MIT` / `TSLPAMT` / `TSLPPCT` 訂單有效 | | client_request_id | string | NO | 冪等性請求 ID,用於防止重複下單。服務器會快取該請求 ID 10 分鐘。在此期間內如果收到相同 ID 的請求,將返回原始響應而不建立重複訂單。必須是唯一標識符(如 UUID)。 | +| attached_params | object | NO | 附加單參數(止盈止損) | +| attached_params.attached_order_type | string | NO | 附加單訂單類型

**可選值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止損
`BRACKET` - 括號單 | +| attached_params.profit_taker_price | string | NO | 止盈觸發價格 | +| attached_params.stop_loss_price | string | NO | 止損觸發價格 | +| attached_params.time_in_force | string | NO | 附加單有效期類型

**可選值:**
`Day` - 當日有效
`GTC` - 撤單前有效
`GTD` - 到期前有效(此時繼承主單 expire_date) | +| attached_params.expire_time | int64 | NO | 到期時間(Unix 時間戳,單位秒) | +| attached_params.activate_order_type | string | NO | 觸發後提交的訂單類型,例如 `LIT`(限價單)或 `MIT`(市價單) | +| attached_params.profit_taker_submit_price | string | NO | 止盈限價委託價格,`activate_order_type` 為 `LIT` 時必填 | +| attached_params.stop_loss_submit_price | string | NO | 止損限價委託價格,`activate_order_type` 為 `LIT` 時必填 | +| attached_params.activate_rth | string | NO | 觸發後提交的訂單是否允許盤前盤後

**可選值:**
`RTH_ONLY` - 不允許盤前盤後
`ANY_TIME` - 允許盤前盤後 | ### 冪等性 diff --git a/docs/zh-HK/docs/trade/order/today_orders.md b/docs/zh-HK/docs/trade/order/today_orders.md index 2c44cbfc..b82141f2 100644 --- a/docs/zh-HK/docs/trade/order/today_orders.md +++ b/docs/zh-HK/docs/trade/order/today_orders.md @@ -38,6 +38,7 @@ longbridge order | 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 @@ -274,7 +275,32 @@ func main() { "remark": "", "limit_depth_level": 0, "monitor_price": "", - "trigger_count": 1 + "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": "" + } + ] } ] } @@ -330,3 +356,25 @@ func main() { | ∟ 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 | 委託價格 | diff --git a/docs/zh-HK/docs/trade/order/withdraw.md b/docs/zh-HK/docs/trade/order/withdraw.md index 9bc236f7..9ceae166 100644 --- a/docs/zh-HK/docs/trade/order/withdraw.md +++ b/docs/zh-HK/docs/trade/order/withdraw.md @@ -35,6 +35,7 @@ longbridge order cancel 693664675163312128 | Name | Type | Required | Description | | -------- | ------ | -------- | ----------- | | order_id | string | YES | 訂單 ID | +| is_attached | bool | NO | order_id 是否為附加單 | ### Request Example