Expose exact midpoint quotes for individual and batched assets
This commit is contained in:
@@ -1075,7 +1075,7 @@ sequenceDiagram
|
||||
E-->>C: 两个结果的 ID 与标签、交易参数、开赛时间
|
||||
```
|
||||
|
||||
### 读取最近一次已提交的价差
|
||||
### 读取最近一次已提交的价差或中点
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
@@ -1090,8 +1090,9 @@ sequenceDiagram
|
||||
participant C as 行情服务
|
||||
participant E as Exchange
|
||||
participant D as SQLite
|
||||
C->>E: spreads(tokens)
|
||||
C->>E: spreads(tokens) 或 midpoints(tokens)
|
||||
E->>D: 单条查询读取各市场最新 quote_events
|
||||
D-->>E: 有双边时返回卖一减买一,缺边时返回空值
|
||||
D-->>E: 返回 YES 的买一和卖一
|
||||
E->>E: 按结果换算两侧,计算价差或精确到半个价格步长的中点
|
||||
E-->>C: 按结果资产索引,未上市资产无条目
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user