Replicate Workspace App output via API

Dear community,

Is it possible to replicate output given by specific apps of workspace through the API?

For instance, I would like to replicate/obtain the following in python:

MSFT.O SFDR

cpurl://apps.cp./Apps/Corp/?s=MSFT.O&st=RIC&view=sfdr#/Apps/EnvtSocGov

This means that at the end of my request I would like to have a dataframe that has the same numbers as displayed here. When hovering over the small (i) icons, I can see that there are some specific dataitems used etc. However, would it be possible to somehow request this output directly through the API?

Thank you for your advice

image.png

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @s2782245

    Thank you for reaching out to us.

    Typically, to retrieve data via the API, you need to know instruments and fields (TR.XXX). Then, you can use the get_data method in the LSEG Data Library for Python to retrieve the values of TR.XXX fields. The examples are on GitHub. For example:

    ld.get_data(['MSFT.OQ','GOOGL.OQ','META.OQ'], 
                ['TR.CO2DirectScope1/TR.F.EVexclCEAdjust(Curn=EUR,Scale=6)',
                 'TR.CO2IndirectScope2/TR.F.EVexclCEAdjust(Curn=EUR,Scale=6)'])
    

    I am not sure why the values are different.

    image.png

    You need contact the helpdesk team via MyAccount to verify the instruments and fields.

  • s2782245
    s2782245 Explorer
    edited April 21

    Dear @Jirapongse ,

    thank you very much for your answer.
    I am aware of the fact that obtaining information through the API typically requires the API request of specific data items. In this case however, I was wondering whether there is another way on obtaining the SFDR information as shown in the screenshot. The reason for this is straight forward: The shown information reflects many different REFINITIV data items which again have to be used in very specific calculations to finally yield the results shown in the screenshot. For this reason, I have several follow up questions:

    1. Is there any alternative way on obtaining the information as it is shown in the screenshot? Is there any way to transform "MSFT.O SFDR" into a request? Maybe through one of the existing rdp libraries or an approach relying on the "screener" functionality of refinitiv? (rdp example: https://github.com/LSEG-API-Samples/Workflow.EikonAPI.RDPLibrary.Python.ESGBondSearch) - EDIT: The idea would be to produce the report on screen for multiple companies.
    2. In your example, you used "ld.get_data" - what is the difference to ek.get_data?
    3. You requested the following "TR.CO2DirectScope1/TR.F.EVexclCEAdjust"
      1. How do "traditional" "TR." items differ from "TR.F." items?
      2. Did you request directly a ratio, or what does in this context "/" mean?
      3. What does Scale=6 indicate?

    Thank you for your help.

    Best regards

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @s2782245

    1. As far as I know, the library doesn't support the "MSFT.O SFDR" request. You need to request by using instruments and fields.
    2. LD is for the LSEG Data Library for Python. It is the new library to retrieve data and provides more functionality than Eikon Data API (ek).
    3. Please contact the helpdesk team via MyAccount to check for the differences. '/' represents a division symbol.
    ld.get_data(['MSFT.OQ','GOOGL.OQ','META.OQ'], 
                ['TR.F.EVexclCEAdjust(Curn=EUR)',
                 'TR.F.EVexclCEAdjust(Curn=EUR,Scale=6)'])
    
    image.png
  • s2782245
    s2782245 Explorer

    Dear Jirapongse,

    thank you very much for your answer. Is it possible to obtain that information "Session Layer" of the LSEG Data Library? In particular, there is a module called "lseg.data.session.desktop" and a module "lseg.data.session.platform" could these approaches help to replicate the response seen in MSFT.O SFDR? Reference: https://cdn.refinitiv.com/public/lseg-lib-python-doc/2.0.0.2/book/en/sections/session-layer/session/session-platform-definition-object.html

    Best regards

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @s2782245

    You may be able to retrieve the same values shown on that page but you need to know RICs and fields (TR.XXX) that can provide those values.

    You need contact the helpdesk team via MyAccount to verify which RICs and TR.xxx fields that can provide those values.