Skip to content

Instantly share code, notes, and snippets.

@antonva
Created January 28, 2014 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonva/8659995 to your computer and use it in GitHub Desktop.
Save antonva/8659995 to your computer and use it in GitHub Desktop.
def get_price():
url = "http://www.cryptocoincharts.info/v2/api/tradingPair/DOGE_BTC"
openUrl = urllib2.urlopen(url).read()
json_str = json.loads(openUrl)
price = json_str["price"]
return price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment