Skip to content

Commit 15d8df9

Browse files
authored
Merge pull request #1423 from Drakkar-Software/dev
dev merge
2 parents d5b106c + 162bccf commit 15d8df9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Trading/Exchange/mexc/mexc_exchange.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
class MEXC(exchanges.RestExchange):
3333
FIX_MARKET_STATUS = True
3434
REMOVE_MARKET_STATUS_PRICE_LIMITS = True
35+
# set True when disabled symbols should still be considered (ex: mexc with its temporary api trading disabled symbols)
36+
# => avoid skipping untradable symbols
37+
INCLUDE_DISABLED_SYMBOLS_IN_AVAILABLE_SYMBOLS = True
3538
EXPECT_POSSIBLE_ORDER_NOT_FOUND_DURING_ORDER_CREATION = True # set True when get_order() can return None
3639
# (order not found) when orders are instantly filled on exchange and are not fully processed on the exchange side.
3740

@@ -108,13 +111,10 @@ async def _mexc_handled_symbols_filter(self, symbol):
108111
try:
109112
yield
110113
except (ccxt.BadSymbol, ccxt.BadRequest) as err:
111-
if CACHED_MEXC_API_HANDLED_SYMBOLS.should_be_updated():
112-
await CACHED_MEXC_API_HANDLED_SYMBOLS.update(self)
113-
if symbol not in CACHED_MEXC_API_HANDLED_SYMBOLS.symbols:
114+
if "symbol not support api" in str(err):
114115
raise octobot_trading.errors.UntradableSymbolError(
115116
f"{self.get_name()} error: {symbol} trading pair is not available to the API at the moment, "
116-
f"{symbol} is under maintenance ({err}). "
117-
f"API available trading pairs are {CACHED_MEXC_API_HANDLED_SYMBOLS.symbols}"
117+
f"{symbol} is under maintenance ({err})."
118118
)
119119
raise err
120120

0 commit comments

Comments
 (0)