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

[Exchanges] add EXCHANGE_IP_WHITELIST_ERRORS #1431

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions Trading/Exchange/coinbase/coinbase_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class Coinbase(exchanges.RestExchange):
# ExchangeError('coinbase {"error":"unknown","error_details":"Missing required scopes",
# "message":"Missing required scopes"}')
("missing required scopes", ),
("permission is required", ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

]
# text content of errors due to traded assets for account
EXCHANGE_ACCOUNT_TRADED_SYMBOL_PERMISSION_ERRORS: typing.List[typing.Iterable[str]] = [
Expand Down
4 changes: 4 additions & 0 deletions Trading/Exchange/kucoin/kucoin_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ class Kucoin(exchanges.RestExchange):
('order cannot be canceled', ),
('order_not_exist_or_not_allow_to_cancel', )
]
# text content of errors due to unhandled IP white list issues
EXCHANGE_IP_WHITELIST_ERRORS: typing.List[typing.Iterable[str]] = [
# ""kucoinfutures Invalid request ip, the current clientIp is:e3b:e3b:e3b:e3b:e3b:e3b:e3b:e3b""
("invalid request ip",),]

DEFAULT_BALANCE_CURRENCIES_TO_FETCH = ["USDT"]

Expand Down
4 changes: 4 additions & 0 deletions Trading/Exchange/mexc/mexc_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class MEXC(exchanges.RestExchange):
# 'mexc {"code":10072,"msg":"Api key info invalid"}'
("api key info invalid",),
]
EXCHANGE_IP_WHITELIST_ERRORS: typing.List[typing.Iterable[str]] = [
# "mexc {"code":700006,"msg":"IP [33.33.33.33] not in the ip white list"}"
("not in the ip white list",),
]

@classmethod
def get_name(cls):
Expand Down