Skip to content

quantpylib.datapoller.master

DataPoller

__init__(config_keys={'binance': {'key': None, 'secret': None}, 'hyperliquid': {'alias': 'hyperliquid', 'key': None, 'secret': None}, 'bybit': {'key': None, 'secret': None}, 'yfinance': {}, 'eodhd': {}, 'oanda': {}})

Initialize the DataPoller class with the provided configuration keys. The configuration keys are passed in as dictionaries with the appropriate key-value pair. An example of the valid key-value format is shown as default arguments. You can create a .envfile and place your keys there, or set it as environment variables. All the datapollers are available through this master poller, by accessing the attribute values datapoller.equities, datapoller.crypto and so on.

Parameters:

Name Type Description Default
config_keys dict

A dictionary containing configuration keys for different data sources. The key-pair dictionary is formatted as "source" : { arg1 : var1 , arg2 : var2 } where each arg is the parameter to the wrapper object instance's constructor in quantpylib.wrappers. An additional key-value for "alias" may be specified, which is used for reference to the src parameter to the datapoller methods. API keys are required for private endpoints only. For instance, we pass in { "binance": { "api_key" : MY_KEY , "api_secret" : SECRET } } matching to the constructor in quantpylib.wrappers.Binance that looks like :

def init(self,api_key=None,api_secret=None,**kwargs):

{'binance': {'key': None, 'secret': None}, 'hyperliquid': {'alias': 'hyperliquid', 'key': None, 'secret': None}, 'bybit': {'key': None, 'secret': None}, 'yfinance': {}, 'eodhd': {}, 'oanda': {}}

Attributes:

Name Type Description
equities Equities

An instance of Equities that uses the specified data pollers and defaults to 'eodhd' as the source.

metadata Metadata

An instance of Metadata that uses the specified data pollers and defaults to 'eodhd' as the source.

crypto Crypto

An instance of Crypto that uses the specified data pollers and defaults to 'binance' as the source.

currencies Currencies

An instance of Currencies that uses the specified data pollers and defaults to 'eodhd' as the source.

exchange Exchange

An instance of Exchange that uses the specified data pollers and defaults to 'eodhd' as the source.