mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
orderStore: remove only filled orders and canceled orders
This commit is contained in:
parent
5fbb06639d
commit
7f0b8f38d5
|
@ -147,8 +147,10 @@ func (s *OrderStore) Prune(expiryDuration time.Duration) {
|
|||
defer s.mu.Unlock()
|
||||
|
||||
for idx, o := range s.orders {
|
||||
if o.UpdateTime.Time().Before(cutOffTime) {
|
||||
continue
|
||||
if o.Status == types.OrderStatusCanceled || o.Status == types.OrderStatusFilled {
|
||||
if o.UpdateTime.Time().Before(cutOffTime) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
orders[idx] = o
|
||||
|
|
Loading…
Reference in New Issue
Block a user