Expose the current committed tick size by outcome ID

This commit is contained in:
2026-12-03 09:32:49 +08:00
parent b523a8890f
commit 81595a89ee
10 changed files with 149 additions and 4 deletions
+18
View File
@@ -140,3 +140,21 @@ sequenceDiagram
E-->>H: 每个资产的成交价和方向
H-->>C: 单笔对象或含 token_id 的数组
```
客户端可通过 `GET /tick-size?token_id=…` 或 `GET /tick-size/{token_id}` 读取当前报价步长。URL 路径中的空格编码为 %20,加号表示加号本身。
```mermaid
flowchart LR
H["market_http.rs"] -->|解码 token_id| T["exchange/tick_size.rs"]
```
```mermaid
sequenceDiagram
participant C as 客户端
participant H as market_http
participant E as Exchange
C->>H: GET /tick-size 或 /tick-size/{token_id}
H->>E: 根据结果资产查询当前已提交步长
E-->>H: 精确十进制数或查无市场
H-->>C: minimum_tick_size 或 404 错误
```