Skip to content

Commit

Permalink
[Community] handle market_making support
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Dec 17, 2024
1 parent 91a4183 commit 6baa7ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion octobot/community/models/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 6baa7ba

Please sign in to comment.