Skip to main content

Module application

Module application 

Source
Expand description

应用层端口。

原 qx-application crate,V10 P2a 按“端口即执行事实契约,归执行网关“并入本 crate。 这里不拥有 EventLog、数据库或具体 Venue;只定义执行编排需要的稳定事实和 端口。Runtime、Storage、Paper、CCXT 和 Binance 通过 adapter 实现这些端口, 避免应用服务反向依赖某个运行时具体类型。

Structs§

ExecutionEventEnvelope
Fill
InstrumentId
可交易工具标识 = native symbol + venue,点号分隔。
Order
OrderGroupSubmission
A venue’s response to one atomic group submission. venue_group_id identifies the exchange-side order-list/resource (for example an OCO list), while each child event retains its own exchange order ID and fills.
OrderPolicy
OrderTrace
Price
价格
Quantity
数量
TradingInstrumentSpec
VenueCapabilities
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§

EventAppendOutcome
Result of appending an execution fact to a store with durable deduplication. Duplicate means the same correlation was already committed and the caller must not repeat the external side effect associated with that fact.
ExecutionEvent
OrderStatus
RiskVerdict
风控端口对单笔订单的裁决。
Side
TradingProduct
VenueMarketScope
VenueOrderType

Constants§

PAPER_VENUE_CAPABILITIES

Traits§

EventAppender
ExecutionEventPort
LedgerProbe
只读的账本条目计数,用于执行结果摘要;实现者不必暴露 Ledger 结构。
OrderStore
RiskPort
VenuePort
VenueRouterPort
多 Venue 路由端口。它刻意只返回标准事实,不承诺跨 Venue 原子性; 应用层必须在每条腿事实落盘后更新 SpreadOrderGroup,失败进入补偿/对账。

Functions§

validate_cancel_events
校验 Venue 返回的撤单事实。撤单竞态中,成交事实必须排在 Cancelled 前面; 撤单接口不能把其他订单的成交、接收或撤单事实写入当前订单。
validate_submit_events
校验 Venue 返回的单腿提交事实。