Expose exact midpoint quotes for individual and batched assets

This commit is contained in:
2026-12-03 09:59:12 +08:00
parent d26c801888
commit b47058d75e
8 changed files with 180 additions and 49 deletions
+4 -4
View File
@@ -181,15 +181,15 @@ sequenceDiagram
路径参数使用百分号编码。即使查询从 NO 开始,primary_token_id 仍对应 YES。可重放请求见[行情 HTTP 示例](../../docs/examples/clob-http.http)。
### 查询盘口价差
### 查询盘口价差与中点
```mermaid
sequenceDiagram
participant C as 行情客户端
participant H as market_http.rs
participant Q as exchange/quotes.rs
C->>H: GET /spread 或 POST /spreads
C->>H: 单查 /spread、/midpoint,批查 /spreads、/midpoints
H->>Q: 传入结果资产 ID
Q-->>H: 每个已上市资产的价差或缺边状态
H-->>C: 单个 spread 字段或按资产 ID 索引的对象
Q-->>H: 每个已上市资产的价差、中点或缺边状态
H-->>C: 单查用 spread 或 mid 字段,批查以资产 ID 为键
```