MCPcopy
hub / github.com/ccxt/ccxt / get_test_symbol

Method get_test_symbol

python/ccxt/test/tests_sync.py:430–446  ·  view source on GitHub ↗
(self, exchange, is_spot, symbols)

Source from the content-addressed store, hash-verified

428 return True
429
430 def get_test_symbol(self, exchange, is_spot, symbols):
431 symbol = None
432 preferred_spot_symbol = exchange.safe_string(self.skipped_settings_for_exchange, 'preferredSpotSymbol')
433 preferred_swap_symbol = exchange.safe_string(self.skipped_settings_for_exchange, 'preferredSwapSymbol')
434 if is_spot and preferred_spot_symbol:
435 return preferred_spot_symbol
436 elif not is_spot and preferred_swap_symbol:
437 return preferred_swap_symbol
438 for i in range(0, len(symbols)):
439 s = symbols[i]
440 market = exchange.safe_value(exchange.markets, s)
441 if market is not None:
442 active = exchange.safe_value(market, 'active')
443 if active or (active is None):
444 symbol = s
445 break
446 return symbol
447
448 def get_exchange_code(self, exchange, codes=None):
449 if codes is None:

Callers 1

get_valid_symbolMethod · 0.95

Calls 3

safe_stringMethod · 0.80
safe_valueMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected