2018-06-07 15:13:37 +00:00
|
|
|
import requests
|
|
|
|
|
|
|
|
|
|
|
|
def get_ethereum_price_in_usd() -> float:
|
|
|
|
url = 'https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=USD'
|
|
|
|
return float(requests.request('GET', url).json()['USD'])
|
|
|
|
|
|
|
|
|
|
|
|
def get_token_info(address: str):
|
2018-10-08 15:08:09 +00:00
|
|
|
url = 'https://api.ethplorer.io/getTokenInfo/%s?apiKey=freekey' % address
|
2018-06-07 15:13:37 +00:00
|
|
|
return requests.request('GET', url).json()
|