import requests
def fetch_binance_symbols():
base_url = ‘https://api.binance.com/api/v3/exchangeInfo’
response = requests.get(base_url)
data = response.json()
symbols = [symbol[‘symbol’] for symbol in data[‘symbols’] if symbol[‘status’] == ‘TRADING’]
return symbols
symbols = fetch_binance_symbols()
print(f"Total trading pairs: {len(symbols)}")