Skip to content

Commit

Permalink
xmaker: fix base quota lock
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Nov 29, 2024
1 parent ad98e52 commit d052bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/strategy/xmaker/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit d052bf5

Please sign in to comment.