diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 936f07735..b6074e210 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -480,8 +480,13 @@ func (s *Strategy) getLayerPrice( } } + sideBook := sourceBook.SideBook(side) + if pv, ok := sideBook.First(); ok { + price = pv.Price + } + if requiredDepth.Sign() > 0 { - price = aggregatePrice(sourceBook.SideBook(side), requiredDepth) + price = aggregatePrice(sideBook, requiredDepth) price = price.Mul(fixedpoint.One.Add(delta)) if i > 0 { price = price.Add(pips.Mul(s.makerMarket.TickSize))