Skip to content

Instantly share code, notes, and snippets.

@thecodingrobot
Last active July 8, 2019 03:00
Show Gist options
  • Select an option

  • Save thecodingrobot/f687b4b9d73efb142985de1edf3291db to your computer and use it in GitHub Desktop.

Select an option

Save thecodingrobot/f687b4b9d73efb142985de1edf3291db to your computer and use it in GitHub Desktop.
Binance BTC pairs to Tradingview watchlist
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))
@hoomanbani
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment