question

Upvotes
Accepted
21 0 0 1

Lack of pricing attribute

Hi,

I'm looking to extract a list of RICs' quotes using the refinitiv.dataplatform . I found this code online that worked for the user who created but I am unable to use it because it tells me the content refinitiv.dataplatform.content module does not have a pricing attribute. I am having similar issues with the search function. I am trying to understand if people are utilizing a different version and that's the cause of the different code. My current version is 1.0.0a20.

Code:

import refinitiv.dataplatform as rd

test_ric = ['465410AH1=2M', '718592AB4=2M', '059891AB7=2M', '059891AA9=2M', '448414AE2=2M']

response = rd.content.pricing.Definition(

test_ric,

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

).get_data()

response.data.df

error:

Traceback (most recent call last):

File "c:\Projects\test.py", line ##, in <module>

response = rd.content.pricing.Definition(

^^^^^^^^^^^^^^^^^^

AttributeError: module 'refinitiv.dataplatform.content' has no attribute 'pricing'

refinitiv-dataplatform-eikon#productrics
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.

@david.blanco

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

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

Thanks,


AHS


Upvote
Accepted
17.4k 82 39 63

Hi @david.blanco

Ensure you are importing the correct library:

import refinitiv.data as rd
test_ric = ['465410AH1=2M', '718592AB4=2M', '059891AB7=2M', '059891AA9=2M', 
            '448414AE2=2M']

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

ahs.png


ahs.png (29.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.

Upvotes
5.8k 21 2 6

Hi @david.blanco,

Have you had a look at the documentation? You can look for specific functions on that documentation page:

1675438136963.png


1675438136963.png (70.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.

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.