cryptodatapy.extract.data_vendors.datavendor

Classes

DataVendor

DataVendor is an abstract base class which provides a blueprint for properties and methods for the

Module Contents

class cryptodatapy.extract.data_vendors.datavendor.DataVendor(categories, exchanges, assets, indexes, markets, market_types, fields, frequencies, base_url, api_endpoints, api_key, max_obs_per_call, rate_limit)

Bases: abc.ABC

DataVendor is an abstract base class which provides a blueprint for properties and methods for the data vendor subclass.

property categories

Returns a list of available categories for the data vendor.

property exchanges

Returns a list of available exchanges for the data vendor.

property assets

Returns a list of available assets for the data vendor.

property indexes

Returns a list of available indices for the data vendor.

property markets

Returns a list of available markets for the data vendor.

property market_types

Returns a list of available market types for the data vendor.

property fields

Returns a list of available fields for the data vendor.

property frequencies

Returns a list of available data frequencies for the data vendor.

property base_url

Returns the base url for the data vendor.

property api_endpoints

Returns api endpoints for the data vendor.

property api_key

Returns the api key for the data vendor.

property max_obs_per_call

Returns the maximum observations per API call for the data vendor.

property rate_limit

Returns the number of API calls made and remaining.

abstractmethod get_exchanges_info()

Gets info for available exchanges from the data vendor.

abstractmethod get_indexes_info()

Gets info for available indexes from the data vendor.

abstractmethod get_assets_info()

Gets info for available assets from the data vendor.

abstractmethod get_markets_info()

Gets info for available markets from the data vendor.

abstractmethod get_fields_info(data_type: str | None)

Gets info for available fields from the data vendor.

abstractmethod get_rate_limit_info()

Gets the number of API calls made and remaining.

abstractmethod get_data(data_req: cryptodatapy.extract.datarequest.DataRequest) pandas.DataFrame

Submits get data request to API.

static wrangle_data_resp(data_req: cryptodatapy.extract.datarequest.DataRequest, data_resp: Dict[str, Any] | pandas.DataFrame, **kwargs) pandas.DataFrame
Abstractmethod:

Wrangles data response from data vendor API into tidy format.