Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Encounter performance issues on querying historical price data

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.

refinitiv-dataplatform-eikon#technology#productpython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@rchan

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@rchan

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
14.2k 30 5 10

Hi @rchan ,

Could you please upgrade your refinitiv-data Python library to version 1.4.0, I cannot reproduce this issue on this version. (the script was run around 18:20, GMT+8)

1706523726237.png


1706523726237.png (71.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
10.2k 18 6 9

@rchan Thanks for your question and sorry to hear about your issue. I have tried this in the Codebook App in Workspace/Eikon and it returns for me instantly. Please see the following code:

rd.get_data(
    universe=['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'],
    fields= ['TR.CLOSEPRICE', 'TR.CLOSEPRICE.calcdate'],
    parameters = {'Frq': 'C', 'SDate': '2024-01-17', 'EDate': '2024-01-17', 'FILL': 'PREVIOUS', 'curn': 'USD'}
)

1705587241387.png

These 25 RICs returned for me instantly. I'm not sure what version of the library you are using but this was running with Refinitiv Data Library 1.4.0. What version of the library are you using?

thanks


1705587241387.png (185.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for reply.


We are using Refinitiv-data 1.3.0 in Python 10. We suffer performance issue on price querying during 16:00 - 19:00 GMT+8, but the task may not be rescheduled into other timeslot as if do so so other daily works will be affected.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.