Files
freqtrade/freqtrade
stremblayiOS 417a0817a7 Fix IndexError in fetch_positions for Hyperliquid when no pair specified
## Summary

Fix IndexError crash in fetch_positions() when initializing wallets on Hyperliquid exchange.

## Quick changelog

- Changed fetch_positions to pass None instead of empty list when no specific pair is requested
- Fixes compatibility with Hyperliquid CCXT implementation that expects None for all positions

## What's new?

When fetch_positions() is called without a specific pair parameter, the code was passing an empty list [] to the CCXT API.
For Hyperliquid exchange, this causes an IndexError because the exchange's implementation attempts to access symbols[0]
without checking if the list is empty.

The CCXT standard is to pass None (not an empty list) when requesting all positions. This change aligns the code with
the CCXT API convention and prevents the crash on Hyperliquid during wallet initialization.

Error that was occurring:
```
IndexError: list index out of range
  at /root/freqtrade/.venv/lib/python3.11/site-packages/ccxt/hyperliquid.py:3051
  market = self.market(symbols[0])
```

This change does not use AI-generated code.
2025-12-05 18:33:40 +01:00
..
2025-10-08 07:08:48 +02:00
2025-10-28 20:00:39 +01:00
2025-11-28 13:29:50 +01:00
2025-11-02 16:49:07 +01:00
2025-11-22 19:51:16 +01:00
2025-11-29 13:10:16 +01:00
2025-10-15 19:31:10 +02:00