Merge pull request #6384 from samgermain/compat-contract

test_ccxt__get_contract_size
This commit is contained in:
Matthias 2022-02-10 19:07:04 +01:00 committed by GitHub
commit 7c66f2776d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,3 +351,14 @@ class TestCCXTExchange():
futures_leverage = futures.get_max_leverage(futures_pair, 20)
assert (isinstance(futures_leverage, float) or isinstance(futures_leverage, int))
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