status-react/test/appium/support/api/third_parties_api.py
yevh-berdnyk 69610e41ad
Added test for verification tokens data using api.ethplorer.io
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
2018-06-08 16:15:21 +02:00

12 lines
357 B
Python

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):
url = 'http://api.ethplorer.io/getTokenInfo/%s?apiKey=freekey' % address
return requests.request('GET', url).json()