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

[BingX] fix market status #1392

Merged
merged 1 commit into from
Nov 27, 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
16 changes: 16 additions & 0 deletions Trading/Exchange/bingx/bingx_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,19 @@ def fix_order(self, raw, **kwargs):
except KeyError:
pass
return fixed

def fix_market_status(self, raw, remove_price_limits=False, **kwargs):
fixed = super().fix_market_status(raw, remove_price_limits=remove_price_limits, **kwargs)
if not fixed:
return fixed
# bingx min and max quantity should be ignored
# https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Spot%20trading%20symbols
limits = fixed[trading_enums.ExchangeConstantsMarketStatusColumns.LIMITS.value]
limits[trading_enums.ExchangeConstantsMarketStatusColumns.LIMITS_AMOUNT.value][
trading_enums.ExchangeConstantsMarketStatusColumns.LIMITS_AMOUNT_MIN.value
] = 0
limits[trading_enums.ExchangeConstantsMarketStatusColumns.LIMITS_AMOUNT.value][
trading_enums.ExchangeConstantsMarketStatusColumns.LIMITS_AMOUNT_MAX.value
] = None

return fixed