From 6baa7ba56c158ca4cdda9d2d5ddd53970fda1cc7 Mon Sep 17 00:00:00 2001 From: Guillaume De Saint Martin Date: Tue, 17 Dec 2024 15:44:43 +0100 Subject: [PATCH] [Community] handle market_making support --- octobot/community/models/formatters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/octobot/community/models/formatters.py b/octobot/community/models/formatters.py index 7aee66dba..a9f597e9c 100644 --- a/octobot/community/models/formatters.py +++ b/octobot/community/models/formatters.py @@ -165,7 +165,11 @@ def get_exchange_type_from_availability(exchange_availability: dict) -> str: # 2. try spot if exchange_availability.get("spot") == backend_enums.ExchangeSupportValues.SUPPORTED.value: return commons_constants.CONFIG_EXCHANGE_SPOT - # 3. something went wrong: select spot and log error + # 3. try market_making + if exchange_availability.get("market_making") == backend_enums.ExchangeSupportValues.SUPPORTED.value: + # use SPOT by default, be more accurate later on if necessary + return commons_constants.CONFIG_EXCHANGE_SPOT + # 4. something went wrong: select spot and log error _get_logger().error( f"Unknown exchange type from exchange availability: {exchange_availability}. " f"Defaulting to {commons_constants.CONFIG_EXCHANGE_SPOT}"