交易停止控制与恢复审查
原能力
停止指定派发或新增风险,并按未决请求、在途义务和恢复条件重新审查。(合同附件 R7 17.11)
首选项目
NautilusTrader(LGPL-3.0(仓库标注))。 NautilusTrader
匹配范围
停止工作与持久恢复编排可作流程基元。
源码
NautilusTrader · pub struct RiskEngine
crates/risk/src/engine/mod.rs · 74–87 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
pub struct RiskEngine {
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
portfolio: Portfolio,
trading_state: TradingState,
config: RiskEngineConfig,
max_notional_per_order: AHashMap<InstrumentId, Decimal>,
throttler_submit: Throttler<TradingCommand, SubmitCommandFn>,
throttler_modify: Throttler<ModifyOrder, ModifyOrderFn>,
reservations: Vec<Reservation>,
command_count: u64,
event_count: u64,
}
- // Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
Temporal Python SDK · async def cancel(
temporalio/client/_workflow.py · 326–339 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
async def cancel(
self,
*,
reason: str = "",
rpc_metadata: Mapping[str, str | bytes] = {},
rpc_timeout: timedelta | None = None,
) -> None:
"""Cancel the workflow.
This will issue a cancellation for :py:attr:`run_id` if present. This
call will make sure to use the run chain starting from
:py:attr:`first_execution_run_id` if present. To create handles with
these values, use :py:meth:`Client.get_workflow_handle`.
实现与验收要点
撤权后的真实停止、在途事实、回放与正式重审。