test_ccxt__get_contract_size

This commit is contained in:
Sam Germain 2022-02-10 06:59:43 -06:00
parent 412fe65344
commit 52fed6e779

View File

@ -351,3 +351,14 @@ class TestCCXTExchange():
futures_leverage = futures.get_max_leverage(futures_pair, 20) futures_leverage = futures.get_max_leverage(futures_pair, 20)
assert (isinstance(futures_leverage, float) or isinstance(futures_leverage, int)) assert (isinstance(futures_leverage, float) or isinstance(futures_leverage, int))
assert futures_leverage >= 1.0 assert futures_leverage >= 1.0
def test_ccxt__get_contract_size(self, exchange_futures):
futures, futures_name = exchange_futures
if futures:
futures_pair = EXCHANGES[futures_name].get(
'futures_pair',
EXCHANGES[futures_name]['pair']
)
contract_size = futures._get_contract_size(futures_pair)
assert (isinstance(contract_size, float) or isinstance(contract_size, int))
assert contract_size >= 0.0