mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
feat: initialize hyperliquid in spot mode by default
This commit is contained in:
parent
ac145a0b65
commit
4a1592dd92
|
@ -5,6 +5,7 @@ from typing import Dict
|
|||
|
||||
from ccxt import SIGNIFICANT_DIGITS
|
||||
|
||||
from freqtrade.enums import TradingMode
|
||||
from freqtrade.exchange import Exchange
|
||||
|
||||
|
||||
|
@ -25,6 +26,16 @@ class Hyperliquid(Exchange):
|
|||
"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
|
||||
def precision_mode_price(self) -> int:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user