Skip to content

Commit e322993

Browse files
authored
Merge pull request freqtrade#12594 from stremblayiOS/fix-hyperliquid-fetch-positions
Fix IndexError in fetch_positions for Hyperliquid when no pair specified
2 parents b1ee115 + 417a081 commit e322993

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

freqtrade/exchange/exchange.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,9 +1834,9 @@ def fetch_positions(self, pair: str | None = None) -> list[CcxtPosition]:
18341834
if self._config["dry_run"] or self.trading_mode != TradingMode.FUTURES:
18351835
return []
18361836
try:
1837-
symbols = []
1837+
symbols = None
18381838
if pair:
1839-
symbols.append(pair)
1839+
symbols = [pair]
18401840
positions: list[CcxtPosition] = self._api.fetch_positions(symbols)
18411841
self._log_exchange_response("fetch_positions", positions)
18421842
return positions

0 commit comments

Comments
 (0)