Skip to content

Commit

Permalink
Merge pull request #2757 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
Dev merge
  • Loading branch information
GuillaumeDSM authored Sep 22, 2024
2 parents c0c47a4 + 6ce6e46 commit 0381f6a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand Down
14 changes: 7 additions & 7 deletions additional_tests/exchanges_tests/test_hollaex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0381f6a

Please sign in to comment.