question

Upvotes
Accepted
1 0 1 2

Pulling PERATIO from get_data_async

Hi everyone,


I have a question regarding asynchronously pulling the PERATIO value. Here, I am following the notation as I found it in the Data Item Builder. However, when I try to pull data asynchronously with Python, it doesn't work.

data = await content.fundamental_and_reference.Definition(universe='AAPL.O', fields=['TR.CLOSEPRICE','TR.BIDPRICE','TR.ASKPRICE', 'PERATIO']).get_data_async(closure='')

I get a ReadTimeout. To troubleshoot, I tried to find another notation for the actual PE Ratio in the Data Item Builder for this, and I couldn't find it. I need some guidance as to how I can pull this value since it is essential to my use case.

Thanks!

python#technologyrdp-apirdprefinitiv-data-librariesasynchronous
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
7.2k 18 2 8

Hi @vishal.nanwani ,


Have you tried using 'TR.PE' ?

data = await fundamental_and_reference.Definition(universe='AAPL.O', fields=['TR.CLOSEPRICE','TR.BIDPRICE','TR.ASKPRICE', 'TR.PE']).get_data_async(closure='')
data.data.df

screenshot-2024-08-19-at-121333.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.

Upvotes
1 0 1 2

Hi @aramyan.h ,


It works now. Thanks!!

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.