From ef877b5fcc1d406bea1450cac11cb76049077171 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 10 Nov 2023 19:40:54 +0100 Subject: [PATCH] Add bitmart to ccxt compat tested exchanges --- tests/exchange_online/conftest.py | 8 ++++++++ tests/exchange_online/test_ccxt_compat.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/exchange_online/conftest.py b/tests/exchange_online/conftest.py index c5f59ee0e..35c9a9d85 100644 --- a/tests/exchange_online/conftest.py +++ b/tests/exchange_online/conftest.py @@ -227,6 +227,7 @@ EXCHANGES = { 'timeframe': '1h', 'futures_pair': 'BTC/USDT:USDT', 'futures': True, + 'orderbook_max_entries': 50, 'leverage_tiers_public': True, 'leverage_in_spot_market': True, 'sample_order': [ @@ -247,6 +248,13 @@ EXCHANGES = { } ] }, + 'bitmart': { + 'pair': 'BTC/USDT', + 'stake_currency': 'USDT', + 'hasQuoteVolume': True, + 'timeframe': '1h', + 'orderbook_max_entries': 50, + }, 'huobi': { 'pair': 'ETH/BTC', 'stake_currency': 'BTC', diff --git a/tests/exchange_online/test_ccxt_compat.py b/tests/exchange_online/test_ccxt_compat.py index aa3dfdfae..b48d70de2 100644 --- a/tests/exchange_online/test_ccxt_compat.py +++ b/tests/exchange_online/test_ccxt_compat.py @@ -133,6 +133,7 @@ class TestCCXTExchange: exch, exchangename = exchange pair = EXCHANGES[exchangename]['pair'] l2 = exch.fetch_l2_order_book(pair) + orderbook_max_entries = EXCHANGES[exchangename].get('orderbook_max_entries') assert 'asks' in l2 assert 'bids' in l2 assert len(l2['asks']) >= 1 @@ -143,7 +144,7 @@ class TestCCXTExchange: # TODO: Gate is unstable here at the moment, ignoring the limit partially. return for val in [1, 2, 5, 25, 50, 100]: - if val > 50 and exchangename == 'bybit': + if orderbook_max_entries and val > orderbook_max_entries: continue l2 = exch.fetch_l2_order_book(pair, val) if not l2_limit_range or val in l2_limit_range: