Created
September 1, 2017 11:25
-
-
Save MiloDavis/0d89a95a8db079ae5c68b924f6f67e44 to your computer and use it in GitHub Desktop.
This file contains 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
import requests | |
import json | |
tzusd = json.loads(requests.get("https://api.hitbtc.com/api/2/public/ticker/XTZUSD").text) | |
last_price = tzusd['last'] | |
num_tez = 763306929.69 | |
print "${:,.2f}\t{:,.2f}\t${:,.2f}".format(float(last_price), float(num_tez), num_tez * float(last_price)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment