Add bitmart to ccxt compat tested exchanges

This commit is contained in:
Matthias
2023-11-10 19:40:54 +01:00
parent 2738f3e437
commit ef877b5fcc
2 changed files with 10 additions and 1 deletions

View File

@@ -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',

View File

@@ -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: