Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
3 0 0 4

Workspace API Query

I am using refinitiv.data version 1.6.1 and Python version 3.12.4. My current subscription is for Refinitiv Workspace. I have the following questions:


  • Is there any option to use the Python API without getting kicked out of the workspace desktop session all the time?
  • What is the exact difference between eikon library, Refinitiv.data and Refinitiv.dataplatform?
  • Is there an official complete documentation set maintained by Refinitiv that shows all available function calls and available arguments other than the repo on github?
  • I was using “rd.get_data(universe=[‘LSEG.L’,’VOD.L’])” and did not get any return but when using “rd.get_history(universe=”LSEG.L”)” I do get a result as expected. Both calls are copied from github. Please advise.
workspaceworkspace-data-api#productpython api
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.

Upvote
27k 65 17 14

Hello @CarloJason.Arcega

Question 1: Is there any option to use the Python API without getting kicked out of the workspace desktop session all the time?

Answer: Are you using the desktop session? ( "sessions": { "default": "desktop.workspace" ...}). If so, the library should not kick out your Workspace desktop session. I strongly suggest you contact your LSEG representative or Account Manager to verify your account permission.

Question 2: What is the exact difference between eikon library, Refinitiv.data and Refinitiv.dataplatform?

Answer:

For more detail, please check the Upgrade from using Eikon Data API to the Data library article

Question 3: Is there an official complete documentation set maintained by Refinitiv that shows all available function calls and available arguments other than the repo on github?

Answer: Unfortunately, no. But you can use the Python built-in help() method to check the function detail dynamically.

Example:

help(rd.get_data)

1721986044034.png

Question 4: I was using “rd.get_data(universe=[‘LSEG.L’,’VOD.L’])” and did not get any return but when using “rd.get_history(universe=”LSEG.L”)” I do get a result as expected. Both calls are copied from github. Please advise.

Answer: The "rd.get_data()" method is for getting the real-time data. Please check with your LSEG representative or Account Manager to verify if you have a real-time data permission.

I did a quick test with Data Library 1.6.1 and Python 3.10. It works fine on my end.

1721986828481.png

Please enable the library log file, and replicate the issue and share the log on this post. You can see how to enable the log on section 2.2.2 Enable logging of the Eikon Data API and Data Library - Troubleshooting article.

Example: refinitiv-data.config.json

{
    "logs": {
        "level": "debug",
        "transports": {
            "console": {
                "enabled": true
            },
            "file": {
                "enabled": true,
                "name": "refinitiv-data-lib.log"
            }
        }
    },
    "sessions": {
        "default": "desktop.workspace",
        
        "desktop": {
            "workspace": {
                "app-key": "App_key"
            }
        }
    }
}

1721986044034.png (42.4 KiB)
1721986828481.png (40.2 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
3 0 0 4

hank you very much for the detailed answer, I am having a couple of follow up questions:

  • Is there a list available of all available fields that can be retrieved and what they are exactly?
  • So, if I use the “desktop.workspace” session, I will not be kicked out, but it will only work if I am logged in on the workspace desktop application? And if I use the platform.rdp session I will be kicked out of the workspace desktop application but it will also work if I am not logged in? Is this the expected behaviour?
  • I have just created a session using the “desktop.workspace” session and I was indeed not kicked out. However, when I run the “rd.get_history” function I am having the following error: “ValueError: Session is not opened. Can’t send any request”.
  • Can you please advise on the difference between the API keys that can be created? What is the recommended one?

1722241668124.png

  • The missing subscription for live prices explains why I was not getting any data when running the rd.get_data request. However, how come it does work for fundamentals though? Considering the rd.get_history function also provides intraday data what is the purpose of having two functions and when do you recommend which function of the two?

1722241668124.png (68.2 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
3 0 0 4

Any update please?

By the way, The API key is just not working for the desktop session, for the platform.rda it is working.

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
3 0 0 4

@wasin.w - may we ask for an update please?

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
27k 65 17 14

Hello @CarloJason.Arcega

I can answer some questions only. I strongly suggest you contact the client's Account Manager to verify the client license and permission.

Question 1: Is there a list available of all available fields that can be retrieved and what they are exactly?

Answer: I am not the content expert. I strongly suggest you contact the Content support team to help the client.

Question 2: So, if I use the “desktop.workspace” session, I will not be kicked out, but it will only work if I am logged in on the workspace desktop application? And if I use the platform.rdp session I will be kicked out of the workspace desktop application but it will also work if I am not logged in? Is this the expected behaviour?

Answer:

  • If the client uses the “desktop.workspace” session (assuming that the client has a valid Workspace license), the client must log in on the Workspace desktop application while using the Data library. The Workspace session should not be kickout.
  • If the client uses the "platform.rdp" session, it means the library is consuming data from the Delivery Platform (RDP - formerly known as Refinitiv Data Platform). The client needs the RDP credential with a valid permission. This "platform.rdp" session does not need the Workspace desktop application.

Please note that if other users/session use the same credentials to access the Workspace Desktop application or RDP API Playground page at the same time, the first client log in will be kicked out.

Question 3: Can you please advise on the difference between the API keys that can be created? What is the recommended one?

Answer:

  • If the client uses "Desktop Session", check on the "Eikon Data API" box
  • If the client uses "Platform Session", check on the "EDP API" box

Question 4: I have just created a session using the “desktop.workspace” session and I was indeed not kicked out. However, when I run the “rd.get_history” function I am having the following error: “ValueError: Session is not opened. Can’t send any request”.

Answer: Please enable the log as I suggested above, and share the log file on this post.


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
3 0 0 4

Hello @wasin.w ,

Question 3: Can you please advise on the difference between the API keys that can be created? What is the recommended one?

Answer:

  • If the client uses "Desktop Session", check on the "Eikon Data API" box
  • If the client uses "Desktop Session", check on the "EDP API" box

Just to confirm, Is it really correct that both API types (question 3) are meant for “Desktop Session"?

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
27k 65 17 14

Hello @CarloJason.Arcega

Sorry for my mistake.

Question 3: Can you please advise on the difference between the API keys that can be created? What is the recommended one?

Answer:

  • If the client uses "Desktop Session", check on the "Eikon Data API" box
  • If the client uses "Platform Session", check on the "EDP API" box
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
3 0 0 4

it is clear now. However, that is not how the behaviour is. Please find attached log, showing that it does not work as you suggest. I am using the “Eikon Data API” key to open a desktop session and I am getting the error message “application key is not valid” (see file “20240802-1757-24232…”). When I try with the “EDP API” I can open the desktop session (see file “20240802-1804-4212…”).


20240802-1757-24232-refinitiv-data-lib.zip


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
3 0 0 4

In addition to below, can you please advise on attached? I am trying to retrieve a couple of fields fo a stock, but most fields are empty, even though they have a value in the Data Item Browser. Why is that?


20240805-1102-1208-refinitiv-data-lib.zip


Thanks @wasin.w in advance.



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
3 0 0 4

Hello @wasin.w ,

any update on this please?

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
27k 65 17 14

Hello @CarloJason.Arcega

### App Key Issues ###

About the App-Key Generator that you need to use "EDP API" instead of "Eikon Data API" to connect the Desktop Session and the "App key is incorrect" issues, there might be something wrong with your Eikon/Workspace permission. I strongly suggest you contact the Workspace support team directly to verify this issue on the Workspace side.

I am not the Workspace support, so you can contact the team via https://myaccount.lseg.com/en/helpandsupport website.

workspace.png

### rd.get_data() return empty fields ###

I am assuming that you are using the following code:

fields = ['TR.COMPANYMARKETCAP','TR.COMPANYMARKETCAPITALIZATION',
          'TR.BETAWKLYADJ2Y','TR.TOTALRETURN','TR.OPENINTEREST',
'TR.OPWCLOSEDELTA','TR.OPWCLOSEIMPLIEDVOLATILITY']
data = rd.get_data(universe=['CLN.S'],
                  fields= fields,
                  parameters= {'SDate':'2024-07-26', 'EDate': '2024-08-02'})
data

I did a quick test. The result is the "Open Interest", "Option Watch Close Delta" and "Option Watch Close Implied Volatility" fields are empty.

I did check a DIB app, but my Workspace cannot find 'TR.OPENINTEREST',
'TR.OPWCLOSEDELTA','TR.OPWCLOSEIMPLIEDVOLATILITY' fields on DIB for CLN.S RIC as follows:

dib-fields.png

I checked the given log; the log shows the following message:

[2024-08-05T11:02:14.234745+02:00] - [sessions.desktop.workspace.0] - [DEBUG] - [3444 - MainThread] - [http_service] - [request] - HTTP Response id 2
    status_code = 200
    text = {"responses":[{"columnHeadersCount":1,"data":[["CLN.S","2024-07-26T00:00:00Z",4791311693.48175,4897853792.61458,"","","","",""],["CLN.S","2024-07-29T00:00:00Z",4832302938.48159,4925847320.51833,"","","","",""],["CLN.S","2024-07-30T00:00:00Z",4417687711.98758,4549783966.40074,"","","","",""],["CLN.S","2024-07-31T00:00:00Z",4338445330.93,4474346056.07019,"","","","",""],["CLN.S","2024-08-02T00:00:00Z",4232224787.25,4468637110.64274,0.896043379306178,-11.4583333333333,"","",""]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"Date"},{"displayName":"Company Market Cap","field":"TR.COMPANYMARKETCAP"},{"displayName":"Company Market Capitalization","field":"TR.COMPANYMARKETCAPITALIZATION"},{"displayName":"Weekly Beta, Adjusted - 2 Year","field":"TR.BETAWKLYADJ2Y"},{"displayName":"Total Return","field":"TR.TOTALRETURN"},{"displayName":"Open Interest","field":"TR.OPENINTEREST"},{"displayName":"Option Watch Close Delta","field":"TR.OPWCLOSEDELTA"},{"displayName":"Option Watch Close Implied Volatility","field":"TR.OPWCLOSEIMPLIEDVOLATILITY"}]],"rowHeadersCount":2,"totalColumnsCount":9,"totalRowsCount":6}]}

The highlighted texts in the response message indicates that the Workspace platform sends empty data response for the 'TR.OPENINTEREST',
'TR.OPWCLOSEDELTA' and 'TR.OPWCLOSEIMPLIEDVOLATILITY' fields to the library.

It means the Workspace platform is the one who sends empty fields response to Library/application.

I strongly suggest you contact the Workspace support team to verify why it sends an empty field data to an application.

(Cont)


workspace.png (13.7 KiB)
dib-fields.png (112.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.

Upvotes
27k 65 17 14

Hello @CarloJason.Arcega

(Cont)

### CF_LAST, CF_CLOSE, CF_VOLUME, CF_NETCHNG not showing with historical Pricing ###

About the next issue, I am assuming that you are using the following code:

rd.get_history(universe="CLN.S", fields=["BID", "ASK","CF_LAST","CF_CLOSE","CF_VOLUME","CF_NETCHNG"],
               start = '2024-07-26', end = '2024-08-02')

The log file shows the following message:

[2024-08-05T11:02:14.530743+02:00] - [sessions.desktop.workspace.0] - [DEBUG] - [27200 - HistoricalRequestThread_0] - [http_service] - [request] - HTTP Response id 3
    status_code = 200
    text = [{"universe":{"ric":"CLN.S"},"interval":"P1D","summaryTimestampLabel":"endPeriod","adjustments":["exchangeCorrection","manualCorrection","CCH","CRE","RTS","RPO"],"defaultPricingField":"TRDPRC_1","qos":{"timeliness":"delayed"},"headers":[{"name":"DATE","type":"string"},{"name":"BID","type":"number","decimalChar":"."},{"name":"ASK","type":"number","decimalChar":"."}],"data":[["2024-08-02",12.74,12.75], ["2024-07-31",13.07,13.08], ["2024-07-30",13.36,13.38], ["2024-07-29",14.51,14.52]],"status":{"code":"TSCC.QS.UserRequestError.90006","message":"The universe does not support the following fields: [CF_LAST, CF_CLOSE, CF_VOLUME, CF_NETCHNG]."},"meta":{"blendingEntry":{"headers":[{"name":"DATE","type":"string"},{"name":"BID","type":"number","decimalChar":"."},{"name":"ASK","type":"number","decimalChar":"."}],"data":[["2024-08-02",12.74,12.75]]}}}]

The highligted message "The universe does not support the following fields: [CF_LAST, CF_CLOSE, CF_VOLUME, CF_NETCHNG]."}" indicates the CLN.S RIC does not support the CF_LAST, CF_CLOSE, CF_VOLUME, CF_NETCHNG fields request for the Historical Pricing Data.

You can use the following statement to check which fields are available for the rd.get_history() method:

rd.get_history(universe="CLN.S", start = '2024-07-26', end = '2024-08-02')

Example Result:

result-2.png

I hope this information helps.

Again, I am not the Workspace support.


result-2.png (54.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.

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.