Example
- BTCUSDT = BTC, USDT
- BTCETH = BTC, ETH
Base on Trading Rule, currently Binance only support the following quote asset class: BTC, ETH, BNB, USDT, PAX, TUSD, USDC
import resymbol = 'BTCUSDT'm = re.search(r'^(\w+)(BTC|ETH|BNB|USDT|PAX|TUSD|USDC|XRP|USDS)$', symbol)if m: part1 = m.group(1) part2 = m.group(2) print(f"{part1}-{part2}")
NOTE: The static assets class is not reliable as Binance might add more or remove some. You might want to query /api/v1/exchangeInfo for an up to date list.