fix: improve check tightness in hyperliquid hip3 config
This commit is contained in:
@@ -65,11 +65,16 @@ class Hyperliquid(Exchange):
|
|||||||
def validate_config(self, config: dict) -> None:
|
def validate_config(self, config: dict) -> None:
|
||||||
"""Validate HIP-3 configuration at bot startup."""
|
"""Validate HIP-3 configuration at bot startup."""
|
||||||
super().validate_config(config)
|
super().validate_config(config)
|
||||||
if self.trading_mode != TradingMode.FUTURES:
|
|
||||||
return
|
|
||||||
configured = self._get_configured_hip3_dexes()
|
configured = self._get_configured_hip3_dexes()
|
||||||
if not configured or not self.markets:
|
if not configured or not self.markets:
|
||||||
return
|
return
|
||||||
|
if self.trading_mode != TradingMode.FUTURES:
|
||||||
|
if configured:
|
||||||
|
raise OperationalException(
|
||||||
|
"HIP-3 DEXes are only supported in FUTURES trading mode. "
|
||||||
|
"Please update your configuration!"
|
||||||
|
)
|
||||||
|
return
|
||||||
if configured and self.margin_mode != MarginMode.ISOLATED:
|
if configured and self.margin_mode != MarginMode.ISOLATED:
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
"HIP-3 DEXes require 'isolated' margin mode. "
|
"HIP-3 DEXes require 'isolated' margin mode. "
|
||||||
|
|||||||
Reference in New Issue
Block a user