diff --git a/docs/source/pages/Exchanges.rst b/docs/source/pages/Exchanges.rst index 37f4b672f..357d0a11e 100644 --- a/docs/source/pages/Exchanges.rst +++ b/docs/source/pages/Exchanges.rst @@ -75,7 +75,7 @@ Depending on the exchange, there can be accounts requirements: for example Binance requires a relatively new (after july 1st 2021) account that doesn't have a referral code. -If your current account is not meeting the partner exchange requirement, you will +If an account you are using is not meeting a partner exchange requirement, you will see an error message: this doesn't prevent your from using OctoBot. However the OctoBot team would greatly appreciate if you could create a new account that meets the exchange's requirements to support the project. diff --git a/octobot/community/community_fields.py b/octobot/community/community_fields.py index 7c5dc470b..f91eb239d 100644 --- a/octobot/community/community_fields.py +++ b/octobot/community/community_fields.py @@ -34,3 +34,4 @@ class CommunityFields(enum.Enum): PORTFOLIO_VALUE = "portfoliovalue" PROFITABILITY = "profitability" TRADED_VOLUMES = "tradedvolumes" + SUPPORTS = "supports" diff --git a/octobot/community/community_manager.py b/octobot/community/community_manager.py index f853843df..073fe8e60 100644 --- a/octobot/community/community_manager.py +++ b/octobot/community/community_manager.py @@ -157,7 +157,8 @@ def _get_bot_community(self): community_fields.CommunityFields.REFERENCE_MARKET.value: self.reference_market, community_fields.CommunityFields.PORTFOLIO_VALUE.value: self._get_real_portfolio_value(), community_fields.CommunityFields.PROFITABILITY.value: self._get_profitability(), - community_fields.CommunityFields.TRADED_VOLUMES.value: self._get_traded_volumes() + community_fields.CommunityFields.TRADED_VOLUMES.value: self._get_traded_volumes(), + community_fields.CommunityFields.SUPPORTS.value: self._get_supports() } } @@ -187,6 +188,18 @@ def _get_traded_volumes(self): volume_by_currency[currency] = trade.total_cost return volume_by_currency + def _get_supports(self): + supporting_exchanges = [] + for exchange_manager in self.exchange_managers: + exchange_name = trading_api.get_exchange_name(exchange_manager) + if self.has_real_trader \ + and trading_api.is_sponsoring(exchange_name) \ + and trading_api.is_valid_account(exchange_manager): + supporting_exchanges.append(exchange_name) + return { + community_fields.CommunityFields.EXCHANGES.value: supporting_exchanges + } + def _get_real_portfolio_value(self): if self.has_real_trader: total_value = 0 diff --git a/requirements.txt b/requirements.txt index 78ea9a674..9d025bff3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ cython==0.29.23 # Drakkar-Software requirements OctoBot-Commons==1.6.4 -OctoBot-Trading==1.13.1 +OctoBot-Trading==1.13.3 OctoBot-Evaluators==1.6.16 OctoBot-Tentacles-Manager==2.5.2 OctoBot-Services==1.2.21