#!/usr/bin/env python3 """ Check MEXC Available Trading Symbols """ import os import sys import logging # Add project root to path sys.path.append(os.path.dirname(os.path.abspath(__file__))) from core.trading_executor import TradingExecutor # Setup logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) def check_mexc_symbols(): """Check available trading symbols on MEXC""" try: logger.info("=== MEXC SYMBOL AVAILABILITY CHECK ===") # Initialize trading executor executor = TradingExecutor("config.yaml") if not executor.exchange: logger.error("Failed to initialize exchange") return # Get all supported symbols logger.info("Fetching all supported symbols from MEXC...") supported_symbols = executor.exchange.get_api_symbols() logger.info(f"Total supported symbols: {len(supported_symbols)}") # Filter ETH-related symbols eth_symbols = [s for s in supported_symbols if 'ETH' in s] logger.info(f"ETH-related symbols ({len(eth_symbols)}):") for symbol in sorted(eth_symbols): logger.info(f" {symbol}") # Filter USDT pairs usdt_symbols = [s for s in supported_symbols if s.endswith('USDT')] logger.info(f"USDT pairs ({len(usdt_symbols)}):") for symbol in sorted(usdt_symbols)[:20]: # Show first 20 logger.info(f" {symbol}") if len(usdt_symbols) > 20: logger.info(f" ... and {len(usdt_symbols) - 20} more") # Filter USDC pairs usdc_symbols = [s for s in supported_symbols if s.endswith('USDC')] logger.info(f"USDC pairs ({len(usdc_symbols)}):") for symbol in sorted(usdc_symbols): logger.info(f" {symbol}") # Check specific symbols we're interested in test_symbols = ['ETHUSDT', 'ETHUSDC', 'BTCUSDT', 'BTCUSDC'] logger.info("Checking specific symbols:") for symbol in test_symbols: if symbol in supported_symbols: logger.info(f" ✅ {symbol} - SUPPORTED") else: logger.info(f" ❌ {symbol} - NOT SUPPORTED") # Show a sample of all available symbols logger.info("Sample of all available symbols:") for symbol in sorted(supported_symbols)[:30]: logger.info(f" {symbol}") if len(supported_symbols) > 30: logger.info(f" ... and {len(supported_symbols) - 30} more") except Exception as e: logger.error(f"Error checking MEXC symbols: {e}") if __name__ == "__main__": check_mexc_symbols()