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 .env
file 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
|
{'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. |