question

Upvotes
Accepted
1 0 1 2

Streaming Chain Issues

I have a client trying to migrate from Eikon Data API to the RD Library. He has been successful in transitioning the code besides when obtaining option chain data. They are able to run the query in Codebook but when they try to run the query locally, they get this error "StreamingChain :: waiting to update because chain decode does not completed.". Below I have attached their queries. I believe it may be due to how they are opening the session. Thanks in advance for any help that is provided.


1719932474400.png


1719932485185.png

eikon-data-api#technologypython apichain-ricrefinitiv-data-libraries
1719932474400.png (14.5 KiB)
1719932485185.png (37.0 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
Accepted
7k 18 2 8

Hi @Chris.Iemma ,


I raised this to the dev team and just learned that it will be resolved in the new version of the library.


Best regards,

Haykaz

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.

Thank you for all of the help Haykaz. That is great to hear.


Upvotes
7k 18 2 8

Hi @Chris.Iemma ,


It is actually an information log informing that the request is still processing, if the client keeps waiting until the request is finished, the API will return the list of chain constituents as in case of Codebook.


Best regards,

Haykaz

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.

Hi Haykaz,

Thank you for your quick response. Two follow ups:

  1. "As the query is running, it still continually prints the following warning to the console: "StreamingChain :: waiting to update because chain decode does not completed."
    Is there any way to suppress this output?"
  2. "It runs very slow. It took ~45 seconds to query the option chain for Microsoft. I'm sure quite a bit of this is networking latency, which Refinitiv has no control over.
    Is there anyway to filter the refinitiv.data.discovery.Chain query server side or any other method to reduce the latency?"


Thanks again for your help.

Hi @Chris.Iemma ,


While I will be checking with the Product team, could you please let me know what is the version of RD Libs, the client is using?


Best regards,

Haykaz

Upvotes
84.6k 287 53 77

@Chris.Iemma

I can disable the warning log on the console by enabling file logging.

import refinitiv.data as rd
from refinitiv.data.discovery import Chain
config = rd.get_config()
config.set_param("logs.transports.file.enabled", True)
config.set_param("logs.transports.file.name", "refinitiv-data-lib.log")
config.set_param("logs.level", "ERROR")


rd.open_session(app_key='<app key>')


rics = Chain("0#MSFT*.U")
rics.constituents

It takes times to get all chain elements because this method subscribes to real-time chain RICs from Real-Time feed to get all chain elements and there are 3076 chain elements for these chain RICs.

Typically, each chain RIC can provide 14 chain elements. Therefore, it needs to subscribe to around 220 chain RICs to get all chain elements.

1719995799601.png

The client can try another function, such as rd.discovery.search. For example:

df = rd.discovery.search(
    view=rd.discovery.Views.EQUITY_QUOTES,
    filter="startswith(RIC,'MSFT') and endswith(RIC,'0.U')",
    top=5000,
    select="DocumentTitle, BusinessEntity, RIC, AssetType, AssetState"
)

df

1719995799601.png (69.7 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.

Thank you Jirapongse. This is very helpful; I really appreciate it.

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.