Expose negative-risk membership and convert fractional outcome balances
This commit is contained in:
@@ -401,3 +401,23 @@ sequenceDiagram
|
||||
H-->>C: 404
|
||||
end
|
||||
```
|
||||
|
||||
### 在下单前判断互斥资产
|
||||
|
||||
官方 Python SDK 可以按 token_id 请求 `GET /neg-risk`。本地的 YES 和 NO 共用所属市场的分组。没有分组的已上架资产返回 false,无法匹配市场则返回 404。
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
H["market_http.rs · GET /neg-risk"] --> E["exchange/neg_risk.rs"] --> S["exchange/schema.sql · neg_risk_members"]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant C as 客户端
|
||||
participant H as market_http.rs
|
||||
participant E as Exchange
|
||||
C->>H: GET /neg-risk?token_id=eb%3ANO%3Aa
|
||||
H->>E: 查询市场 a 的成员关系
|
||||
E-->>H: true
|
||||
H-->>C: 200,neg_risk 为真
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user