From 1d314daa22496a6d60b84fd84eb1cebd639cb76a Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 15 Mar 2024 15:59:43 +0800 Subject: [PATCH] xalign: skip same currency --- pkg/strategy/xalign/strategy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/strategy/xalign/strategy.go b/pkg/strategy/xalign/strategy.go index 42081761a..00fa4dbf4 100644 --- a/pkg/strategy/xalign/strategy.go +++ b/pkg/strategy/xalign/strategy.go @@ -132,6 +132,11 @@ func (s *Strategy) selectSessionForCurrency( } for _, quoteCurrency := range quoteCurrencies { + // skip the same currency, because there is no such USDT/USDT market + if currency == quoteCurrency { + continue + } + // check both quoteCurrency/currency and currency/quoteCurrency symbol := currency + quoteCurrency market, ok := session.Market(symbol)