You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

17 lines
442 B

from requests import get as r_get
def get_market_data(coin_name):
data = {
'localization': False,
'tickers': False,
'market_data': True,
'community_data': False,
'developer_data': False,
'sparkline': False
}
headers = {'accept': 'application/json'}
url = f'https://api.coingecko.com/api/v3/coins/{coin_name}'
r = r_get(url, headers=headers, data=data)
return r.json()