diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 9522a85db..b5010bbbb 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -196,7 +196,7 @@ func (s *Strategy) updateQuote(ctx context.Context, orderExecutionRouter bbgo.Or return } - sourceBook := s.book.CopyDepth(20) + sourceBook := s.book.CopyDepth(10) if valid, err := sourceBook.IsValid(); !valid { log.WithError(err).Errorf("%s invalid copied order book, skip quoting: %v", s.Symbol, err) return diff --git a/pkg/types/rbtorderbook.go b/pkg/types/rbtorderbook.go index 233988eca..eb5a04f7f 100644 --- a/pkg/types/rbtorderbook.go +++ b/pkg/types/rbtorderbook.go @@ -143,7 +143,7 @@ func (b *RBTOrderBook) Copy() OrderBook { func (b *RBTOrderBook) CopyDepth(limit int) OrderBook { var book = NewRBOrderBook(b.Symbol) book.Asks = b.Asks.CopyInorder(limit) - book.Bids = b.Bids.CopyInorder(limit) + book.Bids = b.Bids.CopyInorderReverse(limit) return book }