mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +00:00
Merge pull request #12594 from stremblayiOS/fix-hyperliquid-fetch-positions
Fix IndexError in fetch_positions for Hyperliquid when no pair specified
This commit is contained in:
@@ -1834,9 +1834,9 @@ class Exchange:
|
|||||||
if self._config["dry_run"] or self.trading_mode != TradingMode.FUTURES:
|
if self._config["dry_run"] or self.trading_mode != TradingMode.FUTURES:
|
||||||
return []
|
return []
|
||||||
try:
|
try:
|
||||||
symbols = []
|
symbols = None
|
||||||
if pair:
|
if pair:
|
||||||
symbols.append(pair)
|
symbols = [pair]
|
||||||
positions: list[CcxtPosition] = self._api.fetch_positions(symbols)
|
positions: list[CcxtPosition] = self._api.fetch_positions(symbols)
|
||||||
self._log_exchange_response("fetch_positions", positions)
|
self._log_exchange_response("fetch_positions", positions)
|
||||||
return positions
|
return positions
|
||||||
|
|||||||
Reference in New Issue
Block a user