Skip to content

Commit

Permalink
xalign: skip same currency
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Mar 15, 2024
1 parent 6831c40 commit 1d314da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/strategy/xalign/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d314da

Please sign in to comment.