Derive market order protection from visible opposing depth
This commit is contained in:
@@ -23,6 +23,10 @@ sequenceDiagram
|
||||
alt 连续交易
|
||||
B->>M: match_incoming,传入一条新订单
|
||||
M->>M: 从对手方最优价起遍历,同价按原序号分配
|
||||
else 未指定市价委托保护价
|
||||
B->>M: opposing_levels,传入买卖方向
|
||||
M->>M: 从最优对手价起,逐档汇总同价订单的剩余份额
|
||||
M-->>B: 逐档返回价格和总量,调用方按需停止读取
|
||||
else 盘中按金额买入
|
||||
B->>M: match_budget_buy,传入买单序号、最高价、以微美元计的总预算
|
||||
M->>M: 在同一卖盘上逐单扣减可用预算,末档取预算可负担的最大整数单位数
|
||||
|
||||
Reference in New Issue
Block a user