import httpx import asyncio async def list_bybit_instruments(): categories = ["spot", "linear", "inverse", "option"] async with httpx.AsyncClient() as client: for cat in categories: url = f"https://api.bybit.com/v5/market/instruments-info?category={cat}" print(f"Fetching category: {cat}...") try: resp = await client.get(url) data = resp.json() if data.get("retCode") == 0: symbols = [i["symbol"] for i in data["result"]["list"]] print(f"Found {len(symbols)} symbols in {cat}") # Look for anything non-crypto tradfi_like = [s for s in symbols if "+" in s or any(x in s for x in ["EUR", "GBP", "JPY", "XAU", "XAG", "WTI", "UKO"])] if tradfi_like: print(f"TradFi-like symbols in {cat}: {tradfi_like[:20]}...") else: print(f"Failed to fetch {cat}: {data.get('retMsg')}") except Exception as e: print(f"Error fetching {cat}: {e}") if __name__ == "__main__": asyncio.run(list_bybit_instruments())