diff --git a/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py b/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py index 666d93c17..29f09d7a9 100644 --- a/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py +++ b/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py @@ -69,6 +69,8 @@ class AbstractAuthenticatedExchangeTester: CANCEL_TIMEOUT = 15 EDIT_TIMEOUT = 15 MIN_PORTFOLIO_SIZE = 1 + EXPECT_BALANCE_FILTER_BY_MARKET_STATUS = False # set true when using filtered market status also filters + # fetched balance assets DUPLICATE_TRADES_RATIO = 0 SUPPORTS_DOUBLE_BUNDLED_ORDERS = True # set true when cancelling any bundled order on exchange would automatically cancel the other(s) @@ -102,7 +104,14 @@ async def test_get_portfolio_with_market_filter(self): async with self.local_exchange_manager(market_filter=self._get_market_filter()): # check portfolio fetched with filtered markets (should be equal to the one with all markets) filtered_markets_portfolio = await self.get_portfolio() - assert filtered_markets_portfolio == all_markets_portfolio + if self.EXPECT_BALANCE_FILTER_BY_MARKET_STATUS: + assert filtered_markets_portfolio == { + key: val + for key, val in all_markets_portfolio.items() + if key in symbols.parse_symbol(self.SYMBOL).base_and_quote() + } + else: + assert filtered_markets_portfolio == all_markets_portfolio async def inner_test_get_portfolio(self): self.check_portfolio_content(await self.get_portfolio()) diff --git a/additional_tests/exchanges_tests/test_hollaex.py b/additional_tests/exchanges_tests/test_hollaex.py index c445ed702..3ee1e0c4c 100644 --- a/additional_tests/exchanges_tests/test_hollaex.py +++ b/additional_tests/exchanges_tests/test_hollaex.py @@ -28,33 +28,33 @@ class TestHollaexAuthenticatedExchange( EXCHANGE_NAME = "hollaex" EXCHANGE_TENTACLE_NAME = "hollaex" # specify EXCHANGE_TENTACLE_NAME as the tentacle class has no capital H ORDER_CURRENCY = "ETH" + EXPECT_BALANCE_FILTER_BY_MARKET_STATUS = True # set true when using filtered market status also filters + # fetched balance assets SETTLEMENT_CURRENCY = "USDT" SYMBOL = f"{ORDER_CURRENCY}/{SETTLEMENT_CURRENCY}" ORDER_SIZE = 50 # % of portfolio to include in test orders EXPECT_MISSING_ORDER_FEES_DUE_TO_ORDERS_TOO_OLD_FOR_RECENT_TRADES = True # when recent trades are limited and # closed orders fees are taken from recent trades IGNORE_EXCHANGE_TRADE_ID = True + USE_ORDER_OPERATION_TO_CHECK_API_KEY_RIGHTS = True async def test_get_portfolio(self): await super().test_get_portfolio() async def test_get_portfolio_with_market_filter(self): - # pass if not implemented - pass + await super().test_get_portfolio_with_market_filter() async def test_get_account_id(self): - # pass if not implemented - pass + await super().test_get_account_id() async def test_invalid_api_key_error(self): await super().test_invalid_api_key_error() async def test_get_api_key_permissions(self): - # pass if not implemented - pass + await super().test_get_api_key_permissions() async def test_missing_trading_api_key_permissions(self): - pass + await super().test_missing_trading_api_key_permissions() async def test_get_not_found_order(self): await super().test_get_not_found_order() diff --git a/requirements.txt b/requirements.txt index fc17d0377..82ce17488 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ # Drakkar-Software requirements OctoBot-Commons==1.9.58 -OctoBot-Trading==2.4.110 +OctoBot-Trading==2.4.112 OctoBot-Evaluators==1.9.7 OctoBot-Tentacles-Manager==2.9.16 OctoBot-Services==1.6.17 OctoBot-Backtesting==1.9.7 Async-Channel==2.2.1 -trading-backend==1.2.27 +trading-backend==1.2.28 ## Others colorlog==6.8.0