Serve side-specific execution quotes over the public market HTTP API
This commit is contained in:
@@ -1096,3 +1096,18 @@ sequenceDiagram
|
||||
E->>E: 按结果换算两侧,计算价差或精确到半个价格步长的中点
|
||||
E-->>C: 按结果资产索引,未上市资产无条目
|
||||
```
|
||||
|
||||
交易方向查询也读取 quote_events。execution_price 和 execution_prices 通过 quotes.rs 查询请求时的最优对手价。批量调用在一条 SQL 中读取所有请求的市场,YES 和 NO 分别换算后再按方向取价。
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant H as HTTP 行情服务
|
||||
participant E as Exchange
|
||||
participant Q as quotes.rs
|
||||
participant D as SQLite
|
||||
H->>E: execution_prices,传入资产和交易方向
|
||||
E->>Q: 读取批量报价
|
||||
Q->>D: 单条查询读取每个市场最近一次最优档
|
||||
D-->>Q: 返回买一与卖一
|
||||
Q-->>H: 按资产和方向分组的可用价格
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user