Created
April 2, 2015 23:57
-
-
Save dp7k/754e5bf8e1429c23d534 to your computer and use it in GitHub Desktop.
bitcoin exchange rate
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import requests, json | |
| API_URL_BASE = 'https://api.bitcoinaverage.com/ticker/global/' | |
| CURRENCY = 'EUR' | |
| r = requests.get(API_URL_BASE + CURRENCY, verify=True) | |
| j = r.json() | |
| rate = j['last'] | |
| print(rate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment