Arrondi valeur en euros

This commit is contained in:
nyanloutre 2017-12-21 20:09:08 +01:00
parent aae82d3ecc
commit 61e491699f
Signed by: nyanloutre
GPG Key ID: F85D93686A3A9063
1 changed files with 1 additions and 1 deletions

2
run.py
View File

@ -59,7 +59,7 @@ def get_value(amount):
with urllib.request.urlopen("https://api.coinmarketcap.com/v1/ticker" +
"/dogecoin/?convert=EUR") as url:
data = json.loads(url.read().decode())
return float(data[0]['price_eur'])*amount
return round(float(data[0]['price_eur'])*amount, 2)
def create_address(account):