File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 3232class 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
You can’t perform that action at this time.
0 commit comments