mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 04:03:55 +00:00
Merge pull request #6384 from samgermain/compat-contract
test_ccxt__get_contract_size
This commit is contained in:
commit
7c66f2776d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user