Expose aggregated binary order book depth per outcome

This commit is contained in:
2026-12-03 03:53:29 +08:00
parent 47d49cb8c9
commit 646cf193bb
6 changed files with 100 additions and 14 deletions
+5 -1
View File
@@ -65,7 +65,7 @@ sequenceDiagram
flowchart LR
cmd["src/command.rs"] -->|可选上架条款| cat["src/catalog.rs"]
market["src/market.rs"] -->|同事务保存| cat
api["src/lib.rs"] -->|目录和历史价查询| cat
api["src/lib.rs"] -->|目录、价格与深度查询| cat
cat -->|校验事件标识| valid["src/validation.rs"]
```
@@ -81,6 +81,10 @@ sequenceDiagram
U->>E: history 指定市场、结果和时间窗
E->>D: 按时间与成交序号索引分页查询
E-->>U: 返回成交时间、价格、数量
U->>E: book 指定市场和结果
E->>D: 读取该市场快照,将同结果订单和互补订单按价汇总剩余量
D-->>E: 买档降序,卖档升序
E-->>U: 返回阶段与两侧深度
```
## 最终裁决与模拟资产兑付