|
""" |
|
histohour.py β fetch_histohour(symbol, limit, aggregate, ...) |
|
|
|
API sample: |
|
https://min-api.cryptocompare.com/data/v2/histohour?aggregate=1&e=CCCAGG&extraParams=https:%2F%2Fwww.cryptocompare.com&fsym=BTC&limit=24&tryConversion=false&tsym=USD |
|
""" |
|
|
|
from .client import CryptoCompareClient |
|
|
|
class HistoHour: |
|
def __init__(self): |
|
self.client = CryptoCompareClient() |
|
|
|
def fetch_histohour(self, fsym, tsym, limit=24, aggregate=1, **kwargs): |
|
params = {"fsym": fsym, "tsym": tsym, "limit": limit, "aggregate": aggregate} |
|
params.update(kwargs) |
|
return self.client.get("v2/histohour", params=params) |
|
|