From d052bf5bd7f7088c446d6abbaae74870763acb92 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 29 Nov 2024 20:24:56 +0800 Subject: [PATCH] xmaker: fix base quota lock --- pkg/strategy/xmaker/strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index 3312fc3944..5f955628b0 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -1082,7 +1082,7 @@ func (s *Strategy) updateQuote(ctx context.Context) error { requiredBase := fixedpoint.Min(askQuantity, makerQuota.BaseAsset.Available) if makerQuota.BaseAsset.Lock(requiredBase) && - (s.sourceSession.Margin || hedgeQuota.QuoteAsset.Lock(askQuantity.Mul(askPrice))) { + (s.sourceSession.Margin || hedgeQuota.BaseAsset.Lock(requiredBase)) { // if we bought, then we need to sell the base from the hedge session submitOrders = append(submitOrders, types.SubmitOrder{