Expand description
统一执行层边界。
Venue 只返回 VenueEvent,执行层负责把这些事件转换成运行时标准事实,
再通过本 crate application 子模块的执行端口交给 EventLog、订单状态和 Ledger。Paper、
Binance 以及未来连接器都必须复用这里的事实转换,不能在 CLI 中各写一套。
本 crate 不依赖任何具体运行时或存储后端。
Re-exports§
pub use algo_execution::AlgoExecutionState;pub use algo_execution::AlgoExecutionStatus;pub use algo_execution::AlgoExecutionStep;pub use algo_execution::AlgoParentOrder;pub use algo_execution::ALGO_EXECUTION_STATE_SCHEMA_VERSION;pub use application::*;
Modules§
- algo_
execution - Bounded, restartable submission of a deterministic TWAP/VWAP child plan.
- application
- 应用层端口。
Structs§
- Algo
Child Slice - Borrowed
Venue Port - 把仍使用旧版
Venuetrait 的连接器借用到统一VenuePort,使只持有可变 借用的执行入口(Paper worker、多腿编排)也走同一个ExecutionGateway。 - Canonical
Risk Port - 直接适配
qx-risk::OrderRiskContext的应用层端口。 - Event
LogReconcile Port - 把“结果未知,必须先对账”写成运行时事实的端口适配器(对账判定唯一口径在 qx-genglu 的
order_reconcile_verdict,本端口只落事实、不复制判定)。 - Hedge
Recovery Outcome - Explicit recovery result for a spread group whose confirmed exposure needs
to be offset. The worker never submits a hedge for an unknown original
leg; that case remains
ReconcileRequiredand must be resolved by the venue reconciliation flow first. - Hedge
Recovery Worker - Restart-safe single-node hedge recovery worker.
- Paper
Submit Request - Required Paper execution inputs. Every safety and pricing decision is a named,
mandatory field; this type intentionally has no
Defaultimplementation. - Port
Execution Result - Port
Execution Service - 完全基于 Application Ports 的单腿执行器。
- Risk
Context Port - 把当前账户快照适配为应用层 RiskPort,便于回测、Paper 和实盘执行器
替换风控实现而不改动
ExecutionGateway的订单副作用边界。 - Risk
Execution Context - Submit
Order With Risk Request - Required inputs for the shared order submission boundary. The group store stays explicit so a caller cannot accidentally bypass the multi-leg barrier.
- Venue
Port Adapter - 将现有 Venue 事实适配为应用层 VenuePort。它只做事实类型转换,不写
EventLog/OMS;真正的副作用仍由
ExecutionGateway(PortExecutionService)统一编排。 - Vwap
Volume Bucket
Enums§
Constants§
Traits§
Functions§
- execute_
paper_ submit_ effect - Paper 执行的统一单轨入口:风控预检、行情门禁与事实写入语义只由执行端口决定。
- ingest_
venue_ events - 将 Venue 返回的订单事实统一归约到执行事件端口(EventLog/Ledger 管线)。
- ingest_
venue_ events_ with_ spec - 将含有冻结产品规格的 Venue 成交归约为衍生品记账事实。
- plan_
twap - Split a parent quantity into near-equal slices distributed over the closed
[start_ts, end_ts]interval. Remainder units go to earlier slices so the result is deterministic and exactly conserves the parent quantity. - plan_
vwap - Allocate parent quantity proportional to a frozen market-volume profile. The last bucket receives the integer rounding remainder, preserving the exact parent quantity. The profile is bounded and must contain strictly increasing timestamps and positive volumes.
- spread_
group_ barrier - submit_
order_ with_ risk - 提交一条已通过控制面审计的 SubmitOrder:框架唯一的订单提交入口。
Type Aliases§
- Execution
Gateway - 统一执行网关名称。新运行时、Paper、回测和语言绑定应依赖这个端口化
入口;保留
PortExecutionService作为兼容的具体类型名,避免已有适配器 在迁移期间被迫同时修改。