Expand description
应用层端口。
原 qx-application crate,V10 P2a 按“端口即执行事实契约,归执行网关“并入本 crate。
这里不拥有 EventLog、数据库或具体 Venue;只定义执行编排需要的稳定事实和
端口。Runtime、Storage、Paper、CCXT 和 Binance 通过 adapter 实现这些端口,
避免应用服务反向依赖某个运行时具体类型。
Structs§
- Execution
Event Envelope - Fill
- Instrument
Id - 可交易工具标识 = native symbol + venue,点号分隔。
- Order
- Order
Group Submission - A venue’s response to one atomic group submission.
venue_group_ididentifies the exchange-side order-list/resource (for example an OCO list), while each child event retains its own exchange order ID and fills. - Order
Policy - Order
Trace - Price
- 价格
- Quantity
- 数量
- Trading
Instrument Spec - Venue
Capabilities - A venue’s declared execution surface. Empty/false fields mean unsupported and are rejected at the shared execution boundary; adapters must not infer support from a successful transport call.
Enums§
- Event
Append Outcome - Result of appending an execution fact to a store with durable deduplication.
Duplicatemeans the same correlation was already committed and the caller must not repeat the external side effect associated with that fact. - Execution
Event - Order
Status - Risk
Verdict - 风控端口对单笔订单的裁决。
- Side
- Trading
Product - Venue
Market Scope - Venue
Order Type
Constants§
Traits§
- Event
Appender - Execution
Event Port - Ledger
Probe - 只读的账本条目计数,用于执行结果摘要;实现者不必暴露 Ledger 结构。
- Order
Store - Risk
Port - Venue
Port - Venue
Router Port - 多 Venue 路由端口。它刻意只返回标准事实,不承诺跨 Venue 原子性; 应用层必须在每条腿事实落盘后更新 SpreadOrderGroup,失败进入补偿/对账。
Functions§
- validate_
cancel_ events - 校验 Venue 返回的撤单事实。撤单竞态中,成交事实必须排在 Cancelled 前面; 撤单接口不能把其他订单的成交、接收或撤单事实写入当前订单。
- validate_
submit_ events - 校验 Venue 返回的单腿提交事实。