Skip to content

Instantly share code, notes, and snippets.

@thecodingrobot
Created January 31, 2020 19:50
Show Gist options
  • Select an option

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

Select an option

Save thecodingrobot/458d6a6895da8a5cf267d52840a773e9 to your computer and use it in GitHub Desktop.
import requests
data = requests.get('https://api.binance.com/api/v1/exchangeInfo').json()
data = filter(lambda x: x['isMarginTradingAllowed'], data['symbols'])
symbols = map(lambda x: 'BINANCE:{}'.format(x['symbol']), data)
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