From 52fed6e7797137069aa6870bfd600f1b9c057c94 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Thu, 10 Feb 2022 06:59:43 -0600 Subject: [PATCH] test_ccxt__get_contract_size --- tests/exchange/test_ccxt_compat.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 9fb627028..08b17add8 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -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