We encounter performance issues on querying historical price data when using new Data Platform Python Library.
https://pypi.org/project/refinitiv-data/
The waiting time is long (almost spending more than 30 minute each request) and the situation is not resolved even though we tried methods such as dividing our requests to several smaller batches and adding waiting time between requests.
Below are code samples that how we query the data:
@contextmanager
def rd_session():
"""Context manager for handling a Refinitiv Data Library for Python session."""
try:
rd.open_session()
yield
finally:
rd.close_session()
class Processor(BaseProcessor):
def call_eikon_api(self):
logger.info("Calling Refinitiv Data API...")
with rd_session():
raw_eikon_res = rd.get_data(
universe=self.ticker_list,
fields=self.field_list,
parameters=self.request_settings,
use_field_names_in_headers=True
)
Below is our sample universe, fields and parameters:
{'ticker_list': ['KWEB.K', 'INDY.O', 'ESTC.K', 'VIPS.K', 'EDU', 'OLED.O', 'MDB.O', 'NVDA.O', 'STX.O', 'MBLY.O', 'MSFT.O', 'AMAT.O', 'AMKR.O', 'HCM.O', 'META.O', 'LRCX.O', 'JD.O', 'COIN.O', 'LKNCY.PK', 'EWY', 'UMC', 'INTC.O', 'MU.O', 'PDD.O', 'SNOW.K'], 'field_list': ['TR.CLOSEPRICE', 'TR.CLOSEPRICE.calcdate'], 'request_settings': {'Frq': 'C', 'SDate': '2024-01-17', 'EDate': '2024-01-17', 'FILL': 'PREVIOUS', 'curn': 'USD'}}
May I know if Eikon helpdesk can provide any solution to improve the performance when using Python API? Such situations are happened several times recently and affect our daily operational workflow.