Add huobi to ccxt compat tests

This commit is contained in:
Matthias 2022-02-27 11:56:22 +01:00
parent a922c4df70
commit 68bc2a6107
2 changed files with 12 additions and 1 deletions

View File

@ -18,6 +18,8 @@ class Huobi(Exchange):
"stoploss_on_exchange": True, "stoploss_on_exchange": True,
"stoploss_order_types": {"limit": "stop-limit"}, "stoploss_order_types": {"limit": "stop-limit"},
"ohlcv_candle_limit": 1000, "ohlcv_candle_limit": 1000,
"l2_limit_range": [5, 10, 20],
"l2_limit_range_required": False,
} }
def stoploss_adjust(self, stop_loss: float, order: Dict) -> bool: def stoploss_adjust(self, stop_loss: float, order: Dict) -> bool:

View File

@ -59,6 +59,12 @@ EXCHANGES = {
'hasQuoteVolume': True, 'hasQuoteVolume': True,
'timeframe': '5m', 'timeframe': '5m',
}, },
'huobi': {
'pair': 'BTC/USDT',
'stake_currency': 'USDT',
'hasQuoteVolume': True,
'timeframe': '5m',
},
'bitvavo': { 'bitvavo': {
'pair': 'BTC/EUR', 'pair': 'BTC/EUR',
'stake_currency': 'EUR', 'stake_currency': 'EUR',
@ -140,7 +146,10 @@ class TestCCXTExchange():
else: else:
next_limit = exchange.get_next_limit_in_list( next_limit = exchange.get_next_limit_in_list(
val, l2_limit_range, l2_limit_range_required) val, l2_limit_range, l2_limit_range_required)
if next_limit is None or next_limit > 200: if next_limit is None:
assert len(l2['asks']) > 100
assert len(l2['asks']) > 100
elif next_limit > 200:
# Large orderbook sizes can be a problem for some exchanges (bitrex ...) # Large orderbook sizes can be a problem for some exchanges (bitrex ...)
assert len(l2['asks']) > 200 assert len(l2['asks']) > 200
assert len(l2['asks']) > 200 assert len(l2['asks']) > 200