Expose paginated token price history through the public HTTP service
This commit is contained in:
@@ -980,3 +980,28 @@ sequenceDiagram
|
||||
end
|
||||
E-->>H: 结束读事务并返回数组
|
||||
```
|
||||
|
||||
### 图表客户端读取历史
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
http["cli/market_http.rs"] --> wire["prices_history/http.rs"]
|
||||
wire --> ids["assets.rs"]
|
||||
wire --> history["prices_history.rs"]
|
||||
history --> sql["prices_history.sql"]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant H as HTTP 服务
|
||||
participant W as prices_history/http.rs
|
||||
participant R as prices_history.rs
|
||||
participant D as SQLite
|
||||
H->>W: token_id、窗口或游标
|
||||
W->>W: 校验资产、恢复首次查询的窗口与页大小
|
||||
W->>R: 查询一页或 as_of 时点
|
||||
R->>D: 按窗口、成交与裁决序号上限读取
|
||||
D-->>R: 升序价格点及精度
|
||||
R-->>W: 数据与内部继续位置
|
||||
W-->>H: 公开点字段、偏移和 URL 安全的继续游标
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user