Skip to content

Instantly share code, notes, and snippets.

@thecodingrobot
Created April 16, 2018 14:07
Show Gist options
  • Save thecodingrobot/09bf149445ba8bb95f193b32a32ad2c6 to your computer and use it in GitHub Desktop.
Save thecodingrobot/09bf149445ba8bb95f193b32a32ad2c6 to your computer and use it in GitHub Desktop.
import requests
data = requests.get('https://api.binance.com/api/v1/ticker/24hr').json()
print("ticker,volume,trade_count")
for pair in data:
symbol = pair['symbol']
volume = pair['volume']
trade_cnt = pair['count']
print("{},{},{}".format(symbol, volume, trade_cnt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment