Last update | Oct 2024 |
Environment | Windows, Linux |
Compilers | Compilers: Oracle/Open JDK 11, 17, Amazon Corretto 11. Refer to RTSDK Java Compatibility Matrix document or README file for a complete list of supported compiler versions. |
Prerequisites (Desktop access) | 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. |
Prerequisites (Amazon EC2 access) | Set Up an Amazon EC2 instance based on the LSEG AMI. |
Important Note:
The goal of this Getting Started tutorial is to provide the developer the steps required to confirm access to Real-Time - Optimized (RTO) with the Authentication Version 1 (Machine ID Account) by executing one of the packaged RTSDK examples. EMA and ETA are sub-components of the RTSDK (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 the RTO, retrieving market data content.
The tutorial is applicable to both Linux and Windows environments.
When you register to access RTO with the Authentication Version 1, you should have received a Welcome email containing the following details:
In addition, the examples require a client ID or App Key that can be generated by using the AppKey Generator.
You can find more information about the different of Authentication version 1 and 2 from the following resources:
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.
To begin the process of verifying access to the Real-Time -- Optimized to retrieve streaming data, refer to the Building Examples section defined within the RTSDK Java Installation Guide to 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.
As outlined within the Installation Gude, use Gradle to build the desired example (EMA: runconsumer450; ETA: runVAConsumer).
From your <RTSDK root>/Java directory:
To list the command-line parameters:
> Gradlew runconsumer450 --args="-?"
And an example of how to run this test to retrieve streaming market data:
> Gradlew runconsumer450 --args="-username <Machine ID> -password <password> -clientId <appkey>"
Amazon EC2 instance users
Once you have connected to your Amazon Linux instance, from your /home/ec2-user/RTSDK/Java directory:
> ./gradlew runconsumer450 --args="-username <Machine ID> -password <password> -clientId <appkey>"
Note: The above example is included as part of the EMA bundle.
You can press Ctrl+C buttons to exit the application at any time.
...
> Task :Ema:Examples:runconsumer450
Services :
Service :
Provider : aws
Transport : tcp
Endpoint : ap-southeast-1-aws-1-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : ap-southeast-1a
Service :
Provider : aws
Transport : tcp
Endpoint : ap-southeast-1-aws-3-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : ap-southeast-1a ap-southeast-1b
Service :
Provider : aws
Transport : tcp
Endpoint : ap-southeast-1-aws-2-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : ap-southeast-1b
Service :
Provider : aws
Transport : tcp
Endpoint : eu-west-1-aws-1-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : eu-west-1a
Service :
Provider : aws
Transport : tcp
Endpoint : eu-west-1-aws-3-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : eu-west-1a eu-west-1b
Service :
Provider : aws
Transport : tcp
Endpoint : eu-west-1-aws-2-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : eu-west-1b
Service :
Provider : aws
Transport : tcp
Endpoint : amer-1-t2.streaming-pricing-api.refinitiv.com
Port : 14002
Data Format : rwf
Location : us-east-1a
Service :
Provider : aws
Transport : tcp
Endpoint : amer-3-t2.streaming-pricing-api.refinitiv.com
Port : 14002
Data Format : rwf
Location : us-east-1a us-east-1b
Service :
Provider : aws
Transport : tcp
Endpoint : amer-2-t2.streaming-pricing-api.refinitiv.com
Port : 14002
Data Format : rwf
Location : us-east-1b
Service :
Provider : aws
Transport : tcp
Endpoint : us-east-2-aws-1-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : us-east-2a
Service :
Provider : aws
Transport : tcp
Endpoint : us-east-2-aws-3-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : us-east-2a us-east-2b
Service :
Provider : aws
Transport : tcp
Endpoint : us-east-2-aws-2-med.optimized-pricing-api.refinitiv.net
Port : 14002
Data Format : rwf
Location : us-east-2b
Sep 21, 2021 9:26:02 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
INFO: loggerMsg
ClientName: ChannelCallbackClient
Severity: Info
Text: Received ChannelUp event on channel Channel_1
Instance Name Consumer_1_1
Component Version ads3.4.2.L1.linux.tis.rrg 64-bit
loggerMsgEnd
RefreshMsg
streamId="5"
domain="MarketPrice Domain"
solicited
RefreshComplete
state="Open / Ok / None / ''"
itemGroup="05 03"
permissionData="03 01 01 62 c0"
name="IBM.N"
nameType="1"
serviceId="257"
serviceName="ELEKTRON_DD"
Payload dataType="FieldList"
FieldList FieldListNum="79" DictionaryId="1"
FieldEntry fid="1" name="PROD_PERM" dataType="UInt" value="62"
FieldEntry fid="2" name="RDNDISPLAY" dataType="UInt" value="64"
FieldEntry fid="3" name="DSPLY_NAME" dataType="Rmtes" value="INTL BUS MACHINE"
FieldEntry fid="4" name="RDN_EXCHID" dataType="Enum" value="2"
FieldEntry fid="6" name="TRDPRC_1" dataType="Real" value="132.970000"
FieldEntry fid="7" name="TRDPRC_2" dataType="Real" value="132.970000"
FieldEntry fid="8" name="TRDPRC_3" dataType="Real" value="132.970000"
FieldEntry fid="9" name="TRDPRC_4" dataType="Real" value="132.970000"
FieldEntry fid="10" name="TRDPRC_5" dataType="Real" value="132.970000"
FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="-1.340000"
FieldEntry fid="12" name="HIGH_1" dataType="Real" value="135.640000"
FieldEntry fid="13" name="LOW_1" dataType="Real" value="132.940000"
FieldEntry fid="14" name="PRCTCK_1" dataType="Enum" value="1"
FieldEntry fid="15" name="CURRENCY" dataType="Enum" value="840"
FieldEntry fid="16" name="TRADE_DATE" dataType="Date" value="21 SEP 2021"
FieldEntry fid="18" name="TRDTIM_1" dataType="Time" value="20:00:00:000:000:000"
FieldEntry fid="19" name="OPEN_PRC" dataType="Real" value="135.110000"
FieldEntry fid="21" name="HST_CLOSE" dataType="Real" value="134.310000"
FieldEntry fid="22" name="BID" dataType="Real" value="0.0E-6"
FieldEntry fid="23" name="BID_1" dataType="Real" value="132.940000"
FieldEntry fid="24" name="BID_2" dataType="Real" value="132.940000"
FieldEntry fid="25" name="ASK" dataType="Real" value="0.0E-6"
FieldEntry fid="26" name="ASK_1" dataType="Real" value="132.970000"
FieldEntry fid="27" name="ASK_2" dataType="Real" value="132.970000"
FieldEntry fid="28" name="NEWS" dataType="Rmtes" value="YYYY"
FieldEntry fid="29" name="NEWS_TIME" dataType="Time" value="20:32:03:000:000:000"
FieldEntry fid="30" name="BIDSIZE" dataType="Real" value="0"
FieldEntry fid="31" name="ASKSIZE" dataType="Real" value="0"
FieldEntry fid="32" name="ACVOL_1" dataType="Real" value="823611.0"
FieldEntry fid="34" name="EARNINGS" dataType="Real" value="5.7883"
FieldEntry fid="35" name="YIELD" dataType="Real" value="4.8842"
FieldEntry fid="36" name="PERATIO" dataType="Real" value="23.2036"
FieldEntry fid="37" name="DIVIDENDTP" dataType="Enum" value="0"
FieldEntry fid="38" name="DIVPAYDATE" dataType="Date" value="10 SEP 2021"
FieldEntry fid="39" name="EXDIVDATE" dataType="Date" value="09 AUG 2021"
FieldEntry fid="40" name="CTS_QUAL" dataType="Enum" value="214"
FieldEntry fid="42" name="BLKCOUNT" dataType="Real" value="2.0"
FieldEntry fid="43" name="BLKVOLUM" dataType="Real" value="463185.0"
FieldEntry fid="53" name="TRD_UNITS" dataType="Enum" value="6"
FieldEntry fid="56" name="PCTCHNG" dataType="Real" value="-0.9977"
FieldEntry fid="58" name="DJTIME" dataType="Time" value="(blank data)"
FieldEntry fid="60" name="CLOSE_BID" dataType="Real" value="132.940000"
FieldEntry fid="61" name="CLOSE_ASK" dataType="Real" value="132.960000"
FieldEntry fid="71" name="DIVIDEND" dataType="Real" value="6.5600"
FieldEntry fid="75" name="UPLIMIT" dataType="Real" value="0.0E-6"
FieldEntry fid="76" name="LOLIMIT" dataType="Real" value="0.0E-6"
FieldEntry fid="77" name="NUM_MOVES" dataType="Real" value="4833.0"
FieldEntry fid="78" name="OFFCL_CODE" dataType="Rmtes" value="000459200101"
FieldEntry fid="79" name="HSTCLSDATE" dataType="Date" value="20 SEP 2021"
FieldEntry fid="90" name="YRHIGH" dataType="Real" value="152.8200"
FieldEntry fid="91" name="YRLOW" dataType="Real" value="105.9200"
...
FieldListEnd
PayloadEnd
RefreshMsgEnd
...
The runconsumer450 example does not require any configuration file to execute. The example queries the Delivery Platform (RDP - formerly known as Refinitiv Data Platform) streaming service for a list of valid endpoints, chooses one then subscribes for the IBM.N instrument. Upon this subscription, the application receives an initial image called a RefreshMsg. The RefreshMsg contains all fields for the requested instrument representing the latest up-to-date market values. Following this image, so long as you execute while the market is open, you should see UpdateMsgs or real-time updates reflecting changes in the market.
From your <RTSDK root>/Java directory:
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 us-east-2-aws-3-med.optimized-pricing-api.refinitiv.net:14002 ELEKTRON_DD mp:AAPL.O -uname <Machine ID> -passwd <Password> -clientId <appkey> -connectionType encrypted -sessionMgnt"
Amazon EC2 instance users
Once you have connected to your Amazon Linux instance, from your /home/ec2-user/RTSDK/Java directory:
> ./gradlew runVAConsumer --args="-c us-east-2-aws-3-med.optimized-pricing-api.refinitiv.net:14002 ELEKTRON_DD mp:AAPL.O -uname <Machine ID> -passwd <Password> -clientId <appkey> -connectionType encrypted -sessionMgnt"
Note: The above example uses a specific streaming endpoint, i.e. "amer-3-t2.streaming...". You can optionally change this to test other streaming endpoints within your region. Refer to the output produced from your EMA example run for a listing of discovered and available streaming endpoints for your use.
The output from the ETA will be similar to that of the EMA example, except will not list the available streaming endpoints available for use.
Depending on your setup and access, you may need to provide additional settings if you need to go through a corporate proxy. Use the following command to get a list of options for a specific example application:
For the EMA example:
> Gradlew runconsumer450 --args='-?'
For the ETA example:
> Gradlew runVAConsumer --args="-?"
The output will list a number of parameters available for use, specifically, proxy-related parameters.
Once you have successfully completed the steps above, you can further your learning by following the series of EMA tutorials or ETA tutorials.