mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
bbgo: add executed quantity check when order status is OrderStatusPartiallyFilled
This commit is contained in:
parent
75b8be5e17
commit
8f5f5dfeed
|
@ -349,6 +349,12 @@ func isNewerUpdate(a, b types.Order) bool {
|
||||||
switch b.Status {
|
switch b.Status {
|
||||||
case types.OrderStatusNew:
|
case types.OrderStatusNew:
|
||||||
return true
|
return true
|
||||||
|
case types.OrderStatusPartiallyFilled:
|
||||||
|
// unknown for equal
|
||||||
|
if a.ExecutedQuantity.Compare(b.ExecutedQuantity) > 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case types.OrderStatusFilled:
|
case types.OrderStatusFilled:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user