question

Upvotes
Accepted
1 0 0 0

Consistency of .get_data()

capture12.pngHello,

I am trying to pull real time contributor quotes using refinitiv.data.

import refinitiv.data as rd

import os

os.environ["RD_LIB_CONFIG_PATH"] = "C:\Projects\Configuration"

rd.open_session()

test_ric = ['465410AH1=2M', '718592AB4=2M', '059891AB7=2M', '059891AA9=2M', '448414AE2=2M', '448414AG7=2M', '900123AL4=2M', 'USG46715AD3=2M', 'XS005974615=2M', 'US465410AH18=MKCP']

try:

response = rd.content.pricing.Definition(

test_ric,

fields=["BID_YIELD","ASK_YIELD", "BID", "ASK"]

).get_data()

print(response.data.df)

except Exception as e: print(e)

rd.close_session()

I was able to successfully pull the quotes a few times, but there seems to be inconsistency with the get_data() function, often getting #N/P for the requested fields . I am trying to understand if this is a normal issue or if I have to adjust my code in order to avoid it.


pythonrefinitiv-realtime#technologydata#content
capture11.png (14.2 KiB)
capture12.png (171.9 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.

1 Answer

Upvote
Accepted
2.1k 7 2 7

Hi @david.blanco ,


Thank you for raising this. I can verify that the code you are using is correct. It would be helpful, If you could share screenshots of both versions of responses, if possible. That would help us to investigate the behavior.


In the meantime, I would advise trying to use the access layer of the library and let us know if the behavior repeats. Here is the code I have used along with the response:

response = rd.get_data(
    test_ric,
    fields=["BID_YIELD","ASK_YIELD", "BID", "ASK"])

response

screenshot-2023-02-13-at-093819.png


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.

Hello Haykaz,

Thank you for your help! Using the access layer seems to be working without no issues.

Regards,

David