From d079c44f30501f431b811c35e1ef7dcbd2096d09 Mon Sep 17 00:00:00 2001 From: Xia Guanghui Date: Fri, 18 Sep 2026 10:52:18 +0800 Subject: [PATCH 1/2] docs(trade): add DelayedNotReported order status Documents the new time-conditional order monitoring state across all three locales. Co-Authored-By: Claude Sonnet 5 --- docs/en/docs/trade/definition.mdx | 1 + docs/zh-CN/docs/trade/definition.mdx | 1 + docs/zh-HK/docs/trade/definition.mdx | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/en/docs/trade/definition.mdx b/docs/en/docs/trade/definition.mdx index d92a8cae..632d48b0 100644 --- a/docs/en/docs/trade/definition.mdx +++ b/docs/en/docs/trade/definition.mdx @@ -45,6 +45,7 @@ description: 'Field and enum definitions used by Longbridge trading APIs, includ | ReplacedNotReported | NotReported (Replaced Order) | | ProtectedNotReported | NotReported (Protected Order) | | VarietiesNotReported | NotReported (Conditional Order) | +| DelayedNotReported | Monitoring (Time-Conditional Order)| | FilledStatus | Filled | | WaitToNew | Wait To New | | NewStatus | New | diff --git a/docs/zh-CN/docs/trade/definition.mdx b/docs/zh-CN/docs/trade/definition.mdx index 4084e6e9..bade55cb 100644 --- a/docs/zh-CN/docs/trade/definition.mdx +++ b/docs/zh-CN/docs/trade/definition.mdx @@ -45,6 +45,7 @@ description: 'Longbridge 交易接口用到的字段与枚举定义,包括订 | ReplacedNotReported | 待提交 (改单成功) | | ProtectedNotReported | 待提交 (保价订单) | | VarietiesNotReported | 待提交 (条件单) | +| DelayedNotReported | 监控中 (时间条件单)| | FilledStatus | 已成交 | | WaitToNew | 已提待报 | | NewStatus | 已委托 | diff --git a/docs/zh-HK/docs/trade/definition.mdx b/docs/zh-HK/docs/trade/definition.mdx index 69a64da4..352a3a0a 100644 --- a/docs/zh-HK/docs/trade/definition.mdx +++ b/docs/zh-HK/docs/trade/definition.mdx @@ -45,6 +45,7 @@ description: 'Longbridge 交易接口用到的字段與枚舉定義,包括訂 | ReplacedNotReported | 待提交 (改單成功) | | ProtectedNotReported | 待提交 (保價訂單) | | VarietiesNotReported | 待提交 (條件單) | +| DelayedNotReported | 監控中 (時間條件單)| | FilledStatus | 已成交 | | WaitToNew | 已提待報 | | NewStatus | 已委托 | From 26220bc3771f79e9ffc58fc92b4a5248104696e9 Mon Sep 17 00:00:00 2001 From: Xia Guanghui Date: Tue, 13 Oct 2026 17:53:12 +0800 Subject: [PATCH 2/2] docs(trade): document time-condition orders via delayed_until Sync with order-gateway a0730f74, which exposes delayed_until on the OpenAPI submit, multileg submit and replace requests and returns it on order queries. - submit / submit_multileg: add delayed_until param; add a Time-Condition Orders section listing supported markets and order types - replace: 0 keeps the time condition, 1 clears it, other values set a new time - today_orders / history_orders / order_detail: add delayed_until field - openapi.yaml: replace request, Order schema and examples - changelog: 2026-10-13 entry Co-Authored-By: Claude Opus 5.5 --- docs/en/docs/changelog.mdx | 4 ++++ docs/en/docs/trade/order/history_orders.mdx | 2 ++ docs/en/docs/trade/order/order_detail.mdx | 2 ++ docs/en/docs/trade/order/replace.mdx | 1 + docs/en/docs/trade/order/submit.mdx | 14 ++++++++++++++ docs/en/docs/trade/order/submit_multileg.mdx | 1 + docs/en/docs/trade/order/today_orders.mdx | 2 ++ docs/zh-CN/docs/changelog.mdx | 4 ++++ docs/zh-CN/docs/trade/order/history_orders.mdx | 2 ++ docs/zh-CN/docs/trade/order/order_detail.mdx | 2 ++ docs/zh-CN/docs/trade/order/replace.mdx | 1 + docs/zh-CN/docs/trade/order/submit.mdx | 14 ++++++++++++++ docs/zh-CN/docs/trade/order/submit_multileg.mdx | 1 + docs/zh-CN/docs/trade/order/today_orders.mdx | 2 ++ docs/zh-HK/docs/changelog.mdx | 4 ++++ docs/zh-HK/docs/trade/order/history_orders.mdx | 2 ++ docs/zh-HK/docs/trade/order/order_detail.mdx | 2 ++ docs/zh-HK/docs/trade/order/replace.mdx | 1 + docs/zh-HK/docs/trade/order/submit.mdx | 14 ++++++++++++++ docs/zh-HK/docs/trade/order/submit_multileg.mdx | 1 + docs/zh-HK/docs/trade/order/today_orders.mdx | 2 ++ openapi.yaml | 15 +++++++++++++++ 22 files changed, 93 insertions(+) diff --git a/docs/en/docs/changelog.mdx b/docs/en/docs/changelog.mdx index 44cbf4b0..772057c4 100644 --- a/docs/en/docs/changelog.mdx +++ b/docs/en/docs/changelog.mdx @@ -7,6 +7,10 @@ sidebar_icon: newspaper description: 'Release notes for Longbridge OpenAPI, CLI, MCP and SDKs, newest first: new commands, API endpoints, MCP tools and other changes.' --- +## 2026-10-13 + +- **[Time-condition orders](/docs/trade/order/submit#time-condition-orders)** — pass `delayed_until` when submitting a regular or multi-leg order to have it held and sent automatically at a set time (up to 90 days ahead); change or clear the time with Replace Order, and read it back from the order query APIs + ## 2026-09-28 ### CLI v0.29.0 diff --git a/docs/en/docs/trade/order/history_orders.mdx b/docs/en/docs/trade/order/history_orders.mdx index a7d0f5eb..54bf136c 100644 --- a/docs/en/docs/trade/order/history_orders.mdx +++ b/docs/en/docs/trade/order/history_orders.mdx @@ -284,6 +284,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -391,6 +392,7 @@ 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 | +| ∟ delayed_until | string | true | Time-condition submit time, formatted as a timestamp (second).

`0` when the order is not a time-condition order | | ∟ 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 | diff --git a/docs/en/docs/trade/order/order_detail.mdx b/docs/en/docs/trade/order/order_detail.mdx index 2e90978c..d6a856cf 100644 --- a/docs/en/docs/trade/order/order_detail.mdx +++ b/docs/en/docs/trade/order/order_detail.mdx @@ -266,6 +266,7 @@ func main() { "outside_rth": "ANY_TIME", "currency": "USD", "remark": "1680863603.927165", + "delayed_until": "0", "free_status": "None", "free_amount": "", "free_currency": "", @@ -409,6 +410,7 @@ Order Information | currency | string | true | Currency | | outside_rth | string | true | Enable or disable outside regular trading hours
Default is `UnknownOutsideRth` when the order is not a US stock

**Enum Value:**
`RTH_ONLY` - Regular trading hour only
`ANY_TIME` - Any time
`OVERNIGHT` - Overnight" | | remark | string | true | Remark | +| delayed_until | string | true | Time-condition submit time, formatted as a timestamp (second).

`0` when the order is not a time-condition order | | free_status | string | true | Commission-free Status, default value is None

**Enum Value:**
`None` - None
`Calculated` - Commission-free amount to be calculated
`Pending` - Pending commission-free
`Ready` - Commission-free applied | | free_amount | string | true | Commission-free amount, default value is empty string. | | free_currency | string | true | Commission-free currency, default value is empty string. | diff --git a/docs/en/docs/trade/order/replace.mdx b/docs/en/docs/trade/order/replace.mdx index 194c38b3..df6acdf0 100644 --- a/docs/en/docs/trade/order/replace.mdx +++ b/docs/en/docs/trade/order/replace.mdx @@ -45,6 +45,7 @@ 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 | +| delayed_until | int64 | NO | Time-condition submit time, Unix timestamp in seconds, example: `1767225600`

`0` or omitted - keep the current time condition
`1` - clear the time condition
Other values - set a new time, which must be later than the current time and no more than 90 days ahead | | 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 | diff --git a/docs/en/docs/trade/order/submit.mdx b/docs/en/docs/trade/order/submit.mdx index 890ec773..478f2454 100644 --- a/docs/en/docs/trade/order/submit.mdx +++ b/docs/en/docs/trade/order/submit.mdx @@ -51,6 +51,7 @@ 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). | +| delayed_until | int64 | NO | Time-condition order: the order is held (status `DelayedNotReported`) and only submitted at this time. Unix timestamp in seconds, example: `1767225600`

Must be later than the current time and no more than 90 days ahead. Omit or pass `0` for a regular order. See [Time-Condition Orders](#time-condition-orders) for supported order types | | 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 | @@ -89,6 +90,19 @@ If you do not provide `client_request_id` (or pass an empty value), the request It is strongly recommended to always provide a unique `client_request_id` for critical order submissions to prevent unintended duplicates. +### Time-Condition Orders + +Pass `delayed_until` (Unix timestamp in seconds) to create a time-condition order. The order is not sent to the exchange right away: it stays in `DelayedNotReported` status and is submitted automatically when the time arrives. The time must be later than now and no more than 90 days ahead. + +Supported markets and order types: + +- HK stocks / warrants: `LO` / `ELO` / `MO` / `LIT` / `MIT` +- US stocks / warrants / options: `LO` / `MO` / `LIT` / `MIT` +- SG stocks: `LO` / `MO` / `LIT` / `MIT` +- Crypto: `LO` / `MO` + +Use [Replace Order](./replace) to change the time (`delayed_until` set to a new time) or turn it into a regular order (`delayed_until` set to `1`). Order queries return the time in the `delayed_until` field. + ### Request Example diff --git a/docs/en/docs/trade/order/submit_multileg.mdx b/docs/en/docs/trade/order/submit_multileg.mdx index 0aa51b8c..ea75f9e7 100644 --- a/docs/en/docs/trade/order/submit_multileg.mdx +++ b/docs/en/docs/trade/order/submit_multileg.mdx @@ -39,6 +39,7 @@ This API is used to submit a multi-leg option combination order (such as vertica | ∟ ratio_quantity | string | YES | Leg ratio quantity, example: `1` | | remark | string | NO | Remark (Maximum 255 characters) | | client_request_id | string | NO | Client request ID, used for idempotency (Maximum 64 characters) | +| delayed_until | int64 | NO | Time-condition order: the order is held (status `DelayedNotReported`) and only submitted at this time. Unix timestamp in seconds, example: `1767225600`

Must be later than the current time and no more than 90 days ahead. Only `LO` / `MO` are supported. Omit or pass `0` for a regular order | ### Request Example diff --git a/docs/en/docs/trade/order/today_orders.mdx b/docs/en/docs/trade/order/today_orders.mdx index aa0732cd..b45b22d2 100644 --- a/docs/en/docs/trade/order/today_orders.mdx +++ b/docs/en/docs/trade/order/today_orders.mdx @@ -277,6 +277,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -383,6 +384,7 @@ 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 | +| ∟ delayed_until | string | true | Time-condition submit time, formatted as a timestamp (second).

`0` when the order is not a time-condition order | | ∟ 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 | diff --git a/docs/zh-CN/docs/changelog.mdx b/docs/zh-CN/docs/changelog.mdx index 4dbd971e..2e94db56 100644 --- a/docs/zh-CN/docs/changelog.mdx +++ b/docs/zh-CN/docs/changelog.mdx @@ -7,6 +7,10 @@ sidebar_icon: newspaper description: 'Longbridge OpenAPI、CLI、MCP 与 SDK 的更新日志,按时间倒序列出新增命令、接口、MCP 工具及其他变更。' --- +## 2026-10-13 + +- **[时间条件单](/zh-CN/docs/trade/order/submit#时间条件单)** — 下单与多腿下单支持传入 `delayed_until`,订单先进入监控,到达指定时间(最长 90 天)后自动提交;可通过改单修改或清除提交时间,订单查询接口同步返回该字段 + ## 2026-09-28 ### CLI v0.29.0 diff --git a/docs/zh-CN/docs/trade/order/history_orders.mdx b/docs/zh-CN/docs/trade/order/history_orders.mdx index b665ec42..86ef9769 100644 --- a/docs/zh-CN/docs/trade/order/history_orders.mdx +++ b/docs/zh-CN/docs/trade/order/history_orders.mdx @@ -283,6 +283,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -390,6 +391,7 @@ func main() { | ∟ limit_depth_level | int32 | true | 指定买卖档位 | | ∟ monitor_price | string | true | 监控价格 | | ∟ trigger_count | int32 | true | 触发次数 | +| ∟ delayed_until | string | true | 时间条件单的提交时间,格式为时间戳 (秒)

非时间条件单时为 `0` | | ∟ attached_orders | object[] | false | 附加订单详情列表 | | ∟∟ order_id | string | true | 附加订单 ID | | ∟∟ attached_type_display | int32 | true | 附加订单类型。**可选值:** `1` - 止盈 `2` - 止损 | diff --git a/docs/zh-CN/docs/trade/order/order_detail.mdx b/docs/zh-CN/docs/trade/order/order_detail.mdx index 2a47c00e..88422fdb 100644 --- a/docs/zh-CN/docs/trade/order/order_detail.mdx +++ b/docs/zh-CN/docs/trade/order/order_detail.mdx @@ -265,6 +265,7 @@ func main() { "outside_rth": "ANY_TIME", "currency": "USD", "remark": "1680863603.927165", + "delayed_until": "0", "free_status": "None", "free_amount": "", "free_currency": "", @@ -408,6 +409,7 @@ func main() { | currency | string | true | 结算货币 | | outside_rth | string | true | 是否允许盘前盘后
当订单不是美股时,默认为 UnknownOutsideRth

**可选值:**
`RTH_ONLY` - 不允许盘前盘后
`ANY_TIME` - 允许盘前盘后
`OVERNIGHT` - 夜盘" | | remark | string | true | 备注 | +| delayed_until | string | true | 时间条件单的提交时间,格式为时间戳 (秒)

非时间条件单时为 `0` | | free_status | string | true | 免佣状态,默认为 None

**可选值:**
`None` - 无
`Calculated` - 免佣额待计算
`Pending` - 待免佣
`Ready` - 已免佣 | | free_amount | string | true | 免佣金额,默认为空字符串 | | free_currency | string | true | 免佣货币,默认为空字符串 | diff --git a/docs/zh-CN/docs/trade/order/replace.mdx b/docs/zh-CN/docs/trade/order/replace.mdx index a54ca328..8015d2b8 100644 --- a/docs/zh-CN/docs/trade/order/replace.mdx +++ b/docs/zh-CN/docs/trade/order/replace.mdx @@ -45,6 +45,7 @@ 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` 订单必填 | +| delayed_until | int64 | NO | 时间条件单的提交时间,Unix 时间戳(秒),例如:`1767225600`

`0` 或不传 - 不修改时间条件
`1` - 清除时间条件
其他值 - 设置新的提交时间,必须晚于当前时间且不超过 90 天 | | attached_params | object | NO | 附加单参数(止盈止损) | | attached_params.attached_order_type | string | NO | 附加单订单类型

**可选值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止损
`BRACKET` - 括号单 | | attached_params.profit_taker_price | string | NO | 止盈触发价格 | diff --git a/docs/zh-CN/docs/trade/order/submit.mdx b/docs/zh-CN/docs/trade/order/submit.mdx index 51a03bbe..05f9b393 100644 --- a/docs/zh-CN/docs/trade/order/submit.mdx +++ b/docs/zh-CN/docs/trade/order/submit.mdx @@ -47,6 +47,7 @@ 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)。 | +| delayed_until | int64 | NO | 时间条件单:订单先进入监控(状态为 `DelayedNotReported`),到达该时间后才提交。Unix 时间戳(秒),例如:`1767225600`

必须晚于当前时间且不超过 90 天。不传或传 `0` 表示普通订单。支持的订单类型见[时间条件单](#时间条件单) | | attached_params | object | NO | 附加单参数(止盈止损) | | attached_params.attached_order_type | string | NO | 附加单订单类型

**可选值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止损
`BRACKET` - 括号单 | | attached_params.profit_taker_price | string | NO | 止盈触发价格 | @@ -85,6 +86,19 @@ longbridge order sell TSLA.US 100 --price 260.00 强烈建议在关键下单操作中始终提供唯一的 `client_request_id`,以防止意外的重复订单。 +## 时间条件单 + +传入 `delayed_until`(Unix 时间戳,秒)即可提交时间条件单。订单不会立即报送交易所,而是以 `DelayedNotReported` 状态等待,到达指定时间后自动提交。该时间必须晚于当前时间且不超过 90 天。 + +支持的市场与订单类型: + +- 港股正股 / 窝轮:`LO` / `ELO` / `MO` / `LIT` / `MIT` +- 美股正股 / 窝轮 / 期权:`LO` / `MO` / `LIT` / `MIT` +- 新加坡股票:`LO` / `MO` / `LIT` / `MIT` +- 加密货币:`LO` / `MO` + +可通过[改单](./replace)修改提交时间(`delayed_until` 传新的时间),或转为普通订单(`delayed_until` 传 `1`)。订单查询接口通过 `delayed_until` 字段返回该时间。 + ## Examples 为了方便理解,我们下面以 Python 作为示例,介绍如何实现一些场景的下单操作。 diff --git a/docs/zh-CN/docs/trade/order/submit_multileg.mdx b/docs/zh-CN/docs/trade/order/submit_multileg.mdx index 5f53c3fa..bd3b40ad 100644 --- a/docs/zh-CN/docs/trade/order/submit_multileg.mdx +++ b/docs/zh-CN/docs/trade/order/submit_multileg.mdx @@ -39,6 +39,7 @@ headingLevel: 2 | ∟ ratio_quantity | string | YES | 该腿比例数量,例如:`1` | | remark | string | NO | 备注(最多 255 字符) | | client_request_id | string | NO | 客户端请求 ID,用于幂等(最多 64 字符) | +| delayed_until | int64 | NO | 时间条件单:订单先进入监控(状态为 `DelayedNotReported`),到达该时间后才提交。Unix 时间戳(秒),例如:`1767225600`

必须晚于当前时间且不超过 90 天,仅支持 `LO` / `MO`。不传或传 `0` 表示普通订单 | ### Request Example diff --git a/docs/zh-CN/docs/trade/order/today_orders.mdx b/docs/zh-CN/docs/trade/order/today_orders.mdx index 8f0b3013..b971308e 100644 --- a/docs/zh-CN/docs/trade/order/today_orders.mdx +++ b/docs/zh-CN/docs/trade/order/today_orders.mdx @@ -276,6 +276,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -381,6 +382,7 @@ func main() { | ∟ remark | string | true | 备注 | | ∟ limit_depth_level | int32 | true | 指定买卖档位 | | ∟ trigger_count | int32 | true | 触发次数 | +| ∟ delayed_until | string | true | 时间条件单的提交时间,格式为时间戳 (秒)

非时间条件单时为 `0` | | ∟ monitor_price | string | true | 监控价格 | | ∟ attached_orders | object[] | false | 附加订单详情列表 | | ∟∟ order_id | string | true | 附加订单 ID | diff --git a/docs/zh-HK/docs/changelog.mdx b/docs/zh-HK/docs/changelog.mdx index 63652ea8..304452fb 100644 --- a/docs/zh-HK/docs/changelog.mdx +++ b/docs/zh-HK/docs/changelog.mdx @@ -7,6 +7,10 @@ sidebar_icon: newspaper description: 'Longbridge OpenAPI、CLI、MCP 與 SDK 的更新日誌,按時間倒序列出新增命令、接口、MCP 工具及其他變更。' --- +## 2026-10-13 + +- **[時間條件單](/zh-HK/docs/trade/order/submit#時間條件單)** — 下單與多腿下單支持傳入 `delayed_until`,訂單先進入監控,到達指定時間(最長 90 天)後自動提交;可通過改單修改或清除提交時間,訂單查詢接口同步返回該字段 + ## 2026-09-28 ### CLI v0.29.0 diff --git a/docs/zh-HK/docs/trade/order/history_orders.mdx b/docs/zh-HK/docs/trade/order/history_orders.mdx index 1c6774ae..b8884423 100644 --- a/docs/zh-HK/docs/trade/order/history_orders.mdx +++ b/docs/zh-HK/docs/trade/order/history_orders.mdx @@ -283,6 +283,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -390,6 +391,7 @@ func main() { | ∟ limit_depth_level | int32 | true | 指定買賣檔位 | | ∟ monitor_price | string | true | 監控價格 | | ∟ trigger_count | int32 | true | 觸發次數 | +| ∟ delayed_until | string | true | 時間條件單的提交時間,格式為時間戳 (秒)

非時間條件單時為 `0` | | ∟ attached_orders | object[] | false | 附加訂單詳情列表 | | ∟∟ order_id | string | true | 附加訂單 ID | | ∟∟ attached_type_display | int32 | true | 附加訂單類型。**可選值:** `1` - 止盈 `2` - 止損 | diff --git a/docs/zh-HK/docs/trade/order/order_detail.mdx b/docs/zh-HK/docs/trade/order/order_detail.mdx index 07d87dae..4bcce99f 100644 --- a/docs/zh-HK/docs/trade/order/order_detail.mdx +++ b/docs/zh-HK/docs/trade/order/order_detail.mdx @@ -265,6 +265,7 @@ func main() { "outside_rth": "ANY_TIME", "currency": "USD", "remark": "1680863603.927165", + "delayed_until": "0", "free_status": "None", "free_amount": "", "free_currency": "", @@ -408,6 +409,7 @@ func main() { | currency | string | true | 結算貨幣 | | outside_rth | string | true | 是否允許盤前盤後
當訂單不是美股時,默認為 UnknownOutsideRth

**可選值:**
`RTH_ONLY` - 不允許盤前盤後
`ANY_TIME` - 允許盤前盤後
`OVERNIGHT` - 夜盤 | | remark | string | true | 備註 | +| delayed_until | string | true | 時間條件單的提交時間,格式為時間戳 (秒)

非時間條件單時為 `0` | | free_status | string | true | 免傭狀態,默認為 None

**可選值:**
`None` - 無
`Calculated` - 免傭額待計算
`Pending` - 待免傭
`Ready` - 已免傭 | | free_amount | string | true | 免佣金額,默認為空字符串 | | free_currency | string | true | 免傭貨幣,默認為空字符串 | diff --git a/docs/zh-HK/docs/trade/order/replace.mdx b/docs/zh-HK/docs/trade/order/replace.mdx index 217db591..ecb77364 100644 --- a/docs/zh-HK/docs/trade/order/replace.mdx +++ b/docs/zh-HK/docs/trade/order/replace.mdx @@ -45,6 +45,7 @@ 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` 訂單必填 | +| delayed_until | int64 | NO | 時間條件單的提交時間,Unix 時間戳(秒),例如:`1767225600`

`0` 或不傳 - 不修改時間條件
`1` - 清除時間條件
其他值 - 設置新的提交時間,必須晚於當前時間且不超過 90 天 | | attached_params | object | NO | 附加單參數(止盈止損) | | attached_params.attached_order_type | string | NO | 附加單訂單類型

**可選值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止損
`BRACKET` - 括號單 | | attached_params.profit_taker_price | string | NO | 止盈觸發價格 | diff --git a/docs/zh-HK/docs/trade/order/submit.mdx b/docs/zh-HK/docs/trade/order/submit.mdx index 5dfa8759..96a07ce6 100644 --- a/docs/zh-HK/docs/trade/order/submit.mdx +++ b/docs/zh-HK/docs/trade/order/submit.mdx @@ -51,6 +51,7 @@ 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)。 | +| delayed_until | int64 | NO | 時間條件單:訂單先進入監控(狀態為 `DelayedNotReported`),到達該時間後才提交。Unix 時間戳(秒),例如:`1767225600`

必須晚於當前時間且不超過 90 天。不傳或傳 `0` 表示普通訂單。支持的訂單類型見[時間條件單](#時間條件單) | | attached_params | object | NO | 附加單參數(止盈止損) | | attached_params.attached_order_type | string | NO | 附加單訂單類型

**可選值:**
`PROFIT_TAKER` - 止盈
`STOP_LOSS` - 止損
`BRACKET` - 括號單 | | attached_params.profit_taker_price | string | NO | 止盈觸發價格 | @@ -89,6 +90,19 @@ longbridge order sell TSLA.US 100 --price 260.00 強烈建議在關鍵下單操作中始終提供唯一的 `client_request_id`,以防止意外的重複訂單。 +### 時間條件單 + +傳入 `delayed_until`(Unix 時間戳,秒)即可提交時間條件單。訂單不會立即報送交易所,而是以 `DelayedNotReported` 狀態等待,到達指定時間後自動提交。該時間必須晚於當前時間且不超過 90 天。 + +支持的市場與訂單類型: + +- 港股正股 / 窩輪:`LO` / `ELO` / `MO` / `LIT` / `MIT` +- 美股正股 / 窩輪 / 期權:`LO` / `MO` / `LIT` / `MIT` +- 新加坡股票:`LO` / `MO` / `LIT` / `MIT` +- 加密貨幣:`LO` / `MO` + +可通過[改單](./replace)修改提交時間(`delayed_until` 傳新的時間),或轉為普通訂單(`delayed_until` 傳 `1`)。訂單查詢接口通過 `delayed_until` 字段返回該時間。 + ### Request Example diff --git a/docs/zh-HK/docs/trade/order/submit_multileg.mdx b/docs/zh-HK/docs/trade/order/submit_multileg.mdx index fd8f9867..93b12dcd 100644 --- a/docs/zh-HK/docs/trade/order/submit_multileg.mdx +++ b/docs/zh-HK/docs/trade/order/submit_multileg.mdx @@ -39,6 +39,7 @@ headingLevel: 2 | ∟ ratio_quantity | string | YES | 該腿比例數量,例如:`1` | | remark | string | NO | 備註(最多 255 字符) | | client_request_id | string | NO | 客戶端請求 ID,用於冪等(最多 64 字符) | +| delayed_until | int64 | NO | 時間條件單:訂單先進入監控(狀態為 `DelayedNotReported`),到達該時間後才提交。Unix 時間戳(秒),例如:`1767225600`

必須晚於當前時間且不超過 90 天,僅支持 `LO` / `MO`。不傳或傳 `0` 表示普通訂單 | ### Request Example diff --git a/docs/zh-HK/docs/trade/order/today_orders.mdx b/docs/zh-HK/docs/trade/order/today_orders.mdx index 82906877..00ee1ff5 100644 --- a/docs/zh-HK/docs/trade/order/today_orders.mdx +++ b/docs/zh-HK/docs/trade/order/today_orders.mdx @@ -276,6 +276,7 @@ func main() { "limit_depth_level": 0, "monitor_price": "", "trigger_count": 1, + "delayed_until": "0", "attached_orders": [ { "order_id": "706388312699592705", @@ -382,6 +383,7 @@ func main() { | ∟ limit_depth_level | int32 | true | 指定買賣檔位 | | ∟ monitor_price | string | true | 監控價格 | | ∟ trigger_count | int32 | true | 觸發次數 | +| ∟ delayed_until | string | true | 時間條件單的提交時間,格式為時間戳 (秒)

非時間條件單時為 `0` | | ∟ attached_orders | object[] | false | 附加訂單詳情列表 | | ∟∟ order_id | string | true | 附加訂單 ID | | ∟∟ attached_type_display | int32 | true | 附加訂單類型。**可選值:** `1` - 止盈 `2` - 止損 | diff --git a/openapi.yaml b/openapi.yaml index 58bafe05..db8c32e5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2045,6 +2045,7 @@ paths: limit_depth_level: 0 trigger_count: 0 monitor_price: '' + delayed_until: '0' free_status: None free_amount: '' free_currency: '' @@ -2137,6 +2138,14 @@ paths: nullable: true maxLength: 255 description: Order remark (max 255 characters). + delayed_until: + type: integer + format: int64 + nullable: true + description: | + Time-condition submit time (Unix timestamp, seconds). `0` or omitted keeps the current + time condition; `1` clears it; any other value sets a new time, which must be later + than now and no more than 90 days ahead. responses: '200': description: Successful response @@ -2461,6 +2470,7 @@ paths: limit_depth_level: 0 trigger_count: 0 monitor_price: '' + delayed_until: '0' has_more: false default: description: Unexpected error @@ -2666,6 +2676,7 @@ paths: limit_depth_level: 0 trigger_count: 0 monitor_price: '' + delayed_until: '0' has_more: false default: description: Unexpected error @@ -3586,3 +3597,7 @@ components: type: string nullable: true description: Monitor price for conditional orders. + delayed_until: + type: string + nullable: true + description: Time-condition submit time, Unix timestamp (seconds). `0` when the order is not a time-condition order.