price.streams / Web App / react.js

Hi, I have a few questions regarding codebook?

Question 1: I am now on a trial of Workspace, and I am trying to open a pricing.sream using your kernels. The pricing.streams work for FX, but when I put in an Equity I get an NA. Any idea why?

Question 2: We are developing an internal web app, this web app collates data collected by analysts, the web app is made in react.js. If we need to get realtime pricing for equities we have in our universe / web app, how can we do it? Can we call the API directly from the web app and how?


Regards,

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @ajaber

    Thank you for contacting us, please see the answers below.
    Question 1: I am now on a trial of Workspace, and I am trying to open pricing.streams using your kernels. The pricing.streams work for FX, but when I put in an Equity I get an NA. Any idea why?

    Answer:

    The data "NA" issue can happen for various reasons. Can you share your snippet code, the item name (or RIC name), and the screenshot when the problem occurs?

    Question 2: We are developing an internal web app, this web app collates data collected by analysts, the web app is made in react.js. If we need to get realtime pricing for equities we have in our universe / web app, how can we do it? Can we call the API directly from the web app and how?

    Answer:

    If you want to get real-time streaming data for the web application, there are two suggested APIs as follows:

    The first one is the Refinitiv Data (RD) Library for TypeScript which is an ease-of-use API defining a set of uniform interfaces providing the developer access to the Refinitiv Data Platform (RDP) in TypeScript language. If you are using the Codebook, you are using its cousin API, Refinitiv Data (RD) Library for Python. You can find more detail about the RD Library - TypeScript from the following resources:

    Note: The RD Library TypeScript is still in the beta phase.

    The second one is Real-Time WebSocket API (aka WebSocket API) which is the core WebSocket protocol and specification to connect to the Refinitiv Real-Time (deployed RTDS or Cloud - RTO, the streaming service of RDP). It is a bit low-level but supports various programming languages that support WebSocket and JSON message format. You can find more detail about the WebSocket API from the following resources:

    Hope this helps.

Answers

  • Thanks Wasin,

    On Question 1: Attached is a small screen capture of whats going on.

    On Question 2: I will check and get back to you.

    1679470114806.png



  • Hello @ajaber

    The code looks fine to me. It may be related to the permission issue, could you please try the following code instead?

    rd.get_data(['EUR=', '/VOD.L'])

    The "/VOD.L" is a delayed RIC. If you can get data, it means your account does not have permission to subscribe to that RIC. I recommend you contact your Refinitiv representative/Account manager to verify your permission.

    Alternatively, you may try to enable the RD Library Python log file. Please see more detail in the "Troubleshooting" section of the RD Library - Getting Started with Python page.

    In the codebook, the refinitiv-data.config.json file is available at __RefinitivDataLibrary/ ("/home/jovyan/__RefinitivDataLibrary" in Jupyter term). You can right-click on the file and choose "Open with Editor" to edit the file.
    log-1.png

    Once you have enabled the log, you need to restart the Codebook's Jupyter kernel by clicking on "Kernel" --> "Shutdown all kernels"
    log-2.png

    Then, reopen the notebook file in the codebook.

  • Hi @ajaber,

    I would like to point out that the data retrieved from Workspace using API etc, is licensed to the Workspace named user only. If you are developing a web app, which could be used by other individuals, it would violate the Workspace contract. We offer other RESTful API's like Refinitiv Data Platform, for those purposes.

  • Thank you, this is now clear. Yes delayed quotes did work. We will continue to test using this.
  • Hi
    @Gurpreet,


    For sure, we are well aware of our license, the web-app is used and only accessible by myself (single user). No violation of terms and condition will occur.


    Regards,

  • @wasin.w I'm looking for something similar to this, but using reactjs instead for the front-end UI.

    Any thoughts? Do you have something in place already?

    https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet.RdpRealTimePricing

  • Hello @ajaber

    Thank you for reaching out to me. I am afraid we do not have many code examples that use ReactJS. The projects are as follows:

    Both repositories use the Refinitiv Data Library for TypeScript.

    The https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.DotNet.RdpRealTimePricing projects use the "non-strategic" RDP Library - .NET. If you are looking for the .NET ease-of-use library, there is the Refinitiv Data Library for .NET library and the examples are available on GitHub too.

    Please note that the Refinitiv Data Library (.NET, Python, or TypeScript) is the ease-of-use API that builds on top of the RESTful API Refinitiv Data Platform (RDP) APIs and WebSocket API (for Streaming), so you can use any programming languages, technologies that support HTTP REST, JSON, and WebSocket with RDP and WebSocket APIs.