feat: initialize hyperliquid in spot mode by default
This commit is contained in:
@@ -5,6 +5,7 @@ from typing import Dict
|
|||||||
|
|
||||||
from ccxt import SIGNIFICANT_DIGITS
|
from ccxt import SIGNIFICANT_DIGITS
|
||||||
|
|
||||||
|
from freqtrade.enums import TradingMode
|
||||||
from freqtrade.exchange import Exchange
|
from freqtrade.exchange import Exchange
|
||||||
|
|
||||||
|
|
||||||
@@ -25,6 +26,16 @@ class Hyperliquid(Exchange):
|
|||||||
"exchange_has_overrides": {"fetchTrades": False},
|
"exchange_has_overrides": {"fetchTrades": False},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _ccxt_config(self) -> Dict:
|
||||||
|
# Parameters to add directly to ccxt sync/async initialization.
|
||||||
|
# ccxt defaults to swap mode.
|
||||||
|
config = {}
|
||||||
|
if self.trading_mode == TradingMode.SPOT:
|
||||||
|
config.update({"options": {"defaultType": "spot"}})
|
||||||
|
config.update(super()._ccxt_config)
|
||||||
|
return config
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def precision_mode_price(self) -> int:
|
def precision_mode_price(self) -> int:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user