diff --git a/octobot/community/supabase_backend/community_supabase_client.py b/octobot/community/supabase_backend/community_supabase_client.py index 53b53081f..636980a99 100644 --- a/octobot/community/supabase_backend/community_supabase_client.py +++ b/octobot/community/supabase_backend/community_supabase_client.py @@ -449,14 +449,17 @@ async def fetch_bot_profile_data(self, bot_config_id: str) -> commons_profiles.P if profile_data.trader_simulator.enabled: # attempt 1: set exchange using exchange_id when set in bot_config exchange_ids = [ - config["exchange_id"] + config[enums.ExchangeKeys.EXCHANGE_ID.value] for config in bot_config["exchanges"] - if config.get("exchange_id", None) + if config.get(enums.ExchangeKeys.EXCHANGE_ID.value, None) ] if exchange_ids: exchanges = await self.fetch_exchanges(exchange_ids) exchanges_config = [ - {enums.ExchangeKeys.INTERNAL_NAME.value: exchange[enums.ExchangeKeys.INTERNAL_NAME.value]} + { + enums.ExchangeKeys.INTERNAL_NAME.value: exchange[enums.ExchangeKeys.INTERNAL_NAME.value], + enums.ExchangeKeys.EXCHANGE_ID.value: exchange[enums.ExchangeKeys.ID.value], + } for exchange in exchanges ] else: diff --git a/octobot/community/supabase_backend/enums.py b/octobot/community/supabase_backend/enums.py index 6b49cbdc0..5770f5bac 100644 --- a/octobot/community/supabase_backend/enums.py +++ b/octobot/community/supabase_backend/enums.py @@ -109,6 +109,8 @@ class ExchangeAccountStatuses(enum.Enum): class ExchangeKeys(enum.Enum): ID = "id" INTERNAL_NAME = "internal_name" + EXCHANGE_CREDENTIAL_ID = "exchange_credential_id" + EXCHANGE_ID = "exchange_id" class SignalKeys(enum.Enum): diff --git a/requirements.txt b/requirements.txt index 4e9af4e32..ea079a3dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Drakkar-Software requirements -OctoBot-Commons==1.9.59 +OctoBot-Commons==1.9.60 OctoBot-Trading==2.4.114 OctoBot-Evaluators==1.9.7 OctoBot-Tentacles-Manager==2.9.16