Skip to content

Commit

Permalink
[MEXC] add EXCHANGE_PERMISSION_ERRORS
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 10, 2025
1 parent 752be8f commit 533f361
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Trading/Exchange/mexc/mexc_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import octobot_trading.errors
import octobot_commons.symbols as symbols_util
import octobot_commons.constants as commons_constants
import octobot_trading.constants as constants


class MEXC(exchanges.RestExchange):
Expand All @@ -36,6 +37,10 @@ class MEXC(exchanges.RestExchange):
REQUIRE_ORDER_FEES_FROM_TRADES = True # set True when get_order is not giving fees on closed orders and fees
# text content of errors due to unhandled authentication issues

EXCHANGE_PERMISSION_ERRORS: typing.List[typing.Iterable[str]] = [
# 'mexc {"code":700007,"msg":"No permission to access the endpoint."}'
("no permission to access",),
]
EXCHANGE_AUTHENTICATION_ERRORS: typing.List[typing.Iterable[str]] = [
# 'mexc {"code":10072,"msg":"Api key info invalid"}'
("api key info invalid",),
Expand Down Expand Up @@ -65,6 +70,10 @@ def get_additional_connector_config(self):
}
}

async def get_account_id(self, **kwargs: dict) -> str:
# current impossible to get account UID (10/01/25)
return constants.DEFAULT_SUBACCOUNT_ID

async def create_order(self, order_type: trading_enums.TraderOrderType, symbol: str, quantity: decimal.Decimal,
price: decimal.Decimal = None, stop_price: decimal.Decimal = None,
side: trading_enums.TradeOrderSide = None, current_price: decimal.Decimal = None,
Expand Down

0 comments on commit 533f361

Please sign in to comment.