Refinitiv Real-Time SDK - Java
Quick Start - Connecting to a deployed RTDS
|Last update||Apr 2022|
|Compilers||JDK 1.8 or greater|
The steps outlined within this guide depend on details outlined within the RTSDK Java Installation Guide available within the Documentation tab. Ensure this document is at your disposal.
Access to an existing Refinitiv Real-Time Distribution System to retrieve content
The goal of this Getting Started tutorial is to provide the developer with the steps required to download and confirm they have access to their Refinitiv Real-Time Distribution System (RTDS) by executing one of the packaged RTSDK examples. EMA and ETA are sub-components of the RTSDK (Refinitiv Real-Time SDK) package that includes a number of examples available to test specific functionality. For our purposes, the goal is to walk through the procedure to specify the connection details to access your market data environment to connect and retrieve market data content.
The tutorial is applicable to both Linux and Windows environments.
Download the RTSDK
The Enterprise Message API (EMA) and Enterprise Transport API (ETA) are included in the RTSDK package. Within the RTSDK Java Installation Guide, you can refer to the sections to obtain the download package, set up Gradle, and establish any dependencies required to run the packaged examples.
Select and configure a consumer sample
After you've installed the RTSDK package on your file system, you may test whether you can successfully obtain streaming data from your RTDS environment. Within the Building Examples section defined within the RTSDK Java Installation Guide, ensure you can generate a listing of the RTSDK examples. This will guarantee that your Gradle system is up and running before you try out one of the examples.
Once you have successfully listed the examples as outlined within the Installation Guide, then we can move to the Building and Running an Example using Gradle section within the guide. While there are many examples to try, for our purposes, we will simply consume some streaming market data from the platform using examples for both ETA and EMA.
To run an example, you will need to ensure you have the following:
- Server connection details
- Eg: ads:14002
- Eg: ads:14002
- Service providing market data
- Eg: MDSERVICE
- Eg: MDSERVICE
You will need to reach out to your market data team to get this required information.
Build and run the examples
As outlined within the Installation Gude, use Gradle to build the desired example (ETA: runVAConsumer; EMA: runconsumer100)
To list the command-line parameters:> Gradlew runVAConsumer --args="-?"And an example of how to run this test to retrieve streaming market data:> Gradlew runVAConsumer --args="-c rtds:14002 ELEKTRON_AD mp:AAPL.O"
Upon execution, we are presented with some initial connection results followed by our initial image called a RefreshMsg. The RefreshMsg or initial image contains all fields for the requested instrument representing the latest up-to-date market values. Following this image, we will begin to see UpdateMsgs or real-time updates reflecting changes in the market.
The example application will automatically exit after ~1 minute. Alternatively, you can (Ctrl+C) to exit at any time.
Channel Up Event: java.nio.channels.SocketChannel[connected local=/10.46.208.3:60241 remote=ewa/10.116.80.111:14002]
Received Login Refresh for Username: U8007876
State: Open/Ok/None - text: "Login accepted by host torsrmds11."
Received Source Directory Refresh
State: Open/Ok/None - text: "null"
filter: INFO | GROUP | STATE
vendor: Thomson Reuters
State: Open/Ok/None - text: "All is well"
3/DSPLY_NAME: APPLE INC
16/TRADE_DATE: 21 SEP 2021
(Channel java.nio.channels.SocketChannel[connected local=/10.46.208.3:60241 remote=ewa/10.116.80.111:14002]):
UPDATE TYPE: QUOTE
11683/BIDFINMMID: <blank data>
11684/ASKFINMMID: <blank data>
12783/NBBO_IND: 6 (5)
14246/ORDREC2_MS: <blank data>
The majority of the EMA examples do not provide command-line parameters but instead require modification to the source code. From the RTSDK root directory, navigate to the source directory:
Within the Consumer.java source file, you can modify connection details for your specific environment. For example, within the main function, you will likely need to replace the 'localhost' and 'DIRECT_FEED' values to suit your environment setup. You may need to contact your market data team for these details.
OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();
consumer = EmaFactory.createOmmConsumer(config.host("localhost:14002").username("user"));
ReqMsg reqMsg = EmaFactory.createReqMsg();
Once the source file has been configured, you are ready to execute the EMA example:
> gradlew runconsumer100