xalign: skip same currency

This commit is contained in:
c9s 2024-03-15 15:59:43 +08:00
parent 6831c40371
commit 1d314daa22
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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)