Created
November 21, 2024 19:19
-
-
Save melardev/c60bee2dd57b55946dd7532a7318bc43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ccxt | |
| client = ccxt.mexc() | |
| client.load_markets(params={ | |
| 'type': 'swap' | |
| }) | |
| added = set() | |
| with open('mexc_futures_pairs.txt', 'w') as fd: | |
| for market_key, market_info in client.markets.items(): | |
| if market_info["quote"] != 'USDT': | |
| continue | |
| if not market_info['swap'] and not market_info['future']: | |
| continue | |
| ms = f'MEXC:{market_info["base"]}{market_info["quote"]}.P' | |
| if ms in added: | |
| continue | |
| added.add(ms) | |
| fd.write(ms + '\n') | |
| print(ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment