Last active
July 8, 2019 03:00
-
-
Save thecodingrobot/f687b4b9d73efb142985de1edf3291db to your computer and use it in GitHub Desktop.
Binance BTC pairs to Tradingview watchlist
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 requests | |
| data = requests.get('https://api.binance.com/api/v1/exchangeInfo').json() | |
| symbols = map(lambda x: 'BINANCE:{}'.format(x['symbol']), data['symbols']) | |
| symbols = filter(lambda x: 'BTC' in x, symbols) | |
| print(','.join(symbols)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got this error :
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
============== RESTART: C:\Users\User\Desktop\binance-pairs.py ==============
Traceback (most recent call last):
File "C:\Users\User\Desktop\binance-pairs.py", line 1, in
import requests
ModuleNotFoundError: No module named 'requests'