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!

Best Answer

  • aramyan.h
    Answer ✓

    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

Answers