exchange minor fixes
This commit is contained in:
parent
f3cb7e90e0
commit
e987e0e2a9
@ -2269,11 +2269,11 @@ class Exchange:
|
|||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
"Freqtrade only supports isolated futures for leverage trading")
|
"Freqtrade only supports isolated futures for leverage trading")
|
||||||
|
|
||||||
def get_maintenance_ratio_and_amt(
|
def get_maintenance_ratio_and_amt(
|
||||||
self,
|
self,
|
||||||
pair: str,
|
pair: str,
|
||||||
nominal_value: Optional[float] = 0.0,
|
nominal_value: Optional[float] = 0.0,
|
||||||
) -> Tuple[float, Optional[float]]:
|
) -> Tuple[float, Optional[float]]:
|
||||||
"""
|
"""
|
||||||
:param pair: Market symbol
|
:param pair: Market symbol
|
||||||
:param nominal_value: The total trade amount in quote currency including leverage
|
:param nominal_value: The total trade amount in quote currency including leverage
|
||||||
|
@ -782,6 +782,10 @@ def test_execute_entry(mocker, default_conf_usdt, fee, limit_order,
|
|||||||
name=exchange_name,
|
name=exchange_name,
|
||||||
get_maintenance_ratio_and_amt=MagicMock(return_value=(0.01, 0.01)),
|
get_maintenance_ratio_and_amt=MagicMock(return_value=(0.01, 0.01)),
|
||||||
)
|
)
|
||||||
|
mocker.patch.multiple(
|
||||||
|
'freqtrade.exchange.Okex',
|
||||||
|
get_max_pair_stake_amount=MagicMock(return_value=500000),
|
||||||
|
)
|
||||||
pair = 'ETH/USDT'
|
pair = 'ETH/USDT'
|
||||||
|
|
||||||
assert not freqtrade.execute_entry(pair, stake_amount, is_short=is_short)
|
assert not freqtrade.execute_entry(pair, stake_amount, is_short=is_short)
|
||||||
|
Loading…
Reference in New Issue
Block a user