Websocket API and Java

Hi all,
could someone please answer me if it is possible to use Websocket API with JAVA?

I have seen it here: https://developers.refinitiv.com/en/article-catalog/article/choosing-your-refinitiv-realtime-streaming-api that Websocket API is compatible with .NET, Python, and Typescript.

Many thanks for considering my request.

Best Answer

  • umer.nalla
    umer.nalla LSEG
    Answer ✓

    Hi @anton.skripin

    You can use the Websocket API with Java - If you refer to the tutorials, they mention how you can use any programming language that supports Websockets: Tutorials | Refinitiv Developers

    The Websocket API is not an API or SDK in the commonly understood sense - i.e. there are no Refinitiv specific libraries or DLLs etc to download. If you refer to the Downloads section or the GitHub page you will find Sample source code and Documentation only.

    In theory, you can use any programming language that supports Websocket connectivity and JSON encoding/decoding to develop an application utilising this Websocket API....

    You will need a programming language that supports Websocket creation – intrinsically or through external packages. We provide a few basic examples for C#, Go, Java, Node.js, Perl, Python, R, Ruby – as well as Android and Swift (iOS) specific examples.

    You can find some Java examples on our Github repository:

    websocket-api/Applications/Examples/RDP/java at master · Refinitiv/websocket-api · GitHub

    websocket-api/Applications/Examples/java at master · Refinitiv/websocket-api · GitHub

    However, as pointed out by my colleague @Shadab Hussain - we do recommend you use the RT-SDK if using Java to consume data via Websockets. One benefit of using RT-SDK Java is that the RT-SDK can take care of various overheads of session management, recovery etc - which would have to implement yourself if using the Websocket API.


Answers