Skip to content

[Community] fix order & trading sync #2468

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

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions octobot/community/models/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def format_trades(trades: list, exchange_name: str, bot_id: str) -> list:
return [
_format_trade(trade, exchange_name, bot_id)
for trade in trades
if trade.get(trading_enums.ExchangeConstantsOrderColumns.SYMBOL.value, None) # ignore incomplete trades
]


Expand Down Expand Up @@ -70,6 +71,9 @@ def format_orders(orders: list, exchange_name: str) -> list:
trading_enums.ExchangeConstantsOrderColumns.AMOUNT.value],
}
for storage_order in orders
if storage_order.get(trading_constants.STORAGE_ORIGIN_VALUE, {}).get(
trading_enums.ExchangeConstantsOrderColumns.SYMBOL.value, None
) # ignore incomplete orders
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ async def fetch_product_config(self, product_id: str) -> commons_profiles.Profil
"product_config:product_configs!current_config_id(config, version)"
).eq(enums.ProductKeys.ID.value, product_id).execute()).data[0]
except IndexError:
raise errors.MissingProductConfigError(f"product_id is '{product_id}'")
raise errors.MissingProductConfigError(f"Missing product_id is '{product_id}'")
profile_data = commons_profiles.ProfileData.from_dict(
product["product_config"][enums.ProfileConfigKeys.CONFIG.value]
)
Expand Down