Update test to new list-pairs format
This commit is contained in:
parent
bfe3760f68
commit
11b77cf94c
@ -178,6 +178,8 @@ class Binance(Exchange):
|
|||||||
:param pair: The base/quote currency pair being traded
|
:param pair: The base/quote currency pair being traded
|
||||||
:nominal_value: The total value of the trade in quote currency (collateral + debt)
|
:nominal_value: The total value of the trade in quote currency (collateral + debt)
|
||||||
"""
|
"""
|
||||||
|
if pair not in self._leverage_brackets:
|
||||||
|
return 1.0
|
||||||
pair_brackets = self._leverage_brackets[pair]
|
pair_brackets = self._leverage_brackets[pair]
|
||||||
max_lev = 1.0
|
max_lev = 1.0
|
||||||
for [min_amount, margin_req] in pair_brackets:
|
for [min_amount, margin_req] in pair_brackets:
|
||||||
|
@ -29,7 +29,6 @@ class Ftx(Exchange):
|
|||||||
# (TradingMode.FUTURES, Collateral.CROSS) # TODO-lev: Uncomment once supported
|
# (TradingMode.FUTURES, Collateral.CROSS) # TODO-lev: Uncomment once supported
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool:
|
def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool:
|
||||||
"""
|
"""
|
||||||
Verify stop_loss against stoploss-order value (limit or price)
|
Verify stop_loss against stoploss-order value (limit or price)
|
||||||
|
@ -434,9 +434,9 @@ def test_list_markets(mocker, markets_static, capsys):
|
|||||||
]
|
]
|
||||||
start_list_markets(get_args(args), False)
|
start_list_markets(get_args(args), False)
|
||||||
captured = capsys.readouterr()
|
captured = capsys.readouterr()
|
||||||
assert ("Id,Symbol,Base,Quote,Active,Is pair" in captured.out)
|
assert ("Id,Symbol,Base,Quote,Active,Spot,Margin,Future,Leverage" in captured.out)
|
||||||
assert ("blkbtc,BLK/BTC,BLK,BTC,True,True" in captured.out)
|
assert ("blkbtc,BLK/BTC,BLK,BTC,True,Spot" in captured.out)
|
||||||
assert ("USD-LTC,LTC/USD,LTC,USD,True,True" in captured.out)
|
assert ("USD-LTC,LTC/USD,LTC,USD,True,Spot" in captured.out)
|
||||||
|
|
||||||
# Test --one-column
|
# Test --one-column
|
||||||
args = [
|
args = [
|
||||||
|
@ -2983,7 +2983,7 @@ def test_timeframe_to_next_date():
|
|||||||
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'spot', {}, False),
|
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'spot', {}, False),
|
||||||
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'margin', {}, False),
|
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'margin', {}, False),
|
||||||
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'futures', {}, True),
|
("BTC-PERP", 'BTC', 'USD', "ftx", False, False, True, 'futures', {}, True),
|
||||||
])
|
])
|
||||||
def test_market_is_tradable(
|
def test_market_is_tradable(
|
||||||
mocker, default_conf, market_symbol, base,
|
mocker, default_conf, market_symbol, base,
|
||||||
quote, spot, margin, futures, trademode, add_dict, exchange, expected_result
|
quote, spot, margin, futures, trademode, add_dict, exchange, expected_result
|
||||||
|
Loading…
Reference in New Issue
Block a user