Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Community] handle market_making support #2830

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading