Elektron SDK - C/C++

API Family: Elektron

ETA Quick Start - Connecting to Elektron Real Time in Cloud

Last Update April 2019
Environment Windows, Linux
Compiler C++, Cmake
Prerequisite

Setup your build environment as outlined in the ESDK Build System instructions

ERT in Cloud credentials i.e. Machine ID (username) and Password

The goal of this Quick Start tutorial is to guide you through initial steps required to execute an Elektron Transport API (ETA) C++ example application in order to consume some data from Elektron RealTime (ERT) in Cloud services.

ETA is a sub-component of the ESDK (Elektron SDK) which includes several examples to demonstrate various functionalities of ETA.  Below we will invoke one of these examples that supports ERT in Cloud type connection, using your credentials, to request streaming market data content from ERT in Cloud.

The tutorial will cover both Linux and Windows environments.

Build and run an ERT in Cloud example

As per the Prerequisite, you should have already worked through the ESDK Build System section which covers Downloading and Building the makefiles / solution files.

Several ETA examples can be found in the Cpp-C/Eta/Applications/Examples subdirectory. Here you can find directories for the various Consumers and Providers examples (as well as common directories for shared source). The readme file in each example directory explains the purpose and functionality of each example.

Compile the sample

If you have not already compiled all the examples, we will compile an ERT in Cloud compatible consumer example - VAConsumer which supports connectivity to an ERT in Cloud server. It relies on the command line to specify your connectivity parameters and your user credentials to connect and login to the ERT in Cloud server.

Once connected, the example requests the specified instrument and then outputs the server response(s) to standard out on the console.

Following is the path to relevant directories:

Paths
Example Source Code   <ESDK root>\Cpp-C\Eta\Applications\Examples\VAConsumer
Generated project file   SOLUTION_FILES\Cpp-C\Eta\Applications\Examples\VAConsumer 
Output Binary   <ESDK root>\Cpp-C\Eta\Executables\ *
Libcurld library   <ESDK root>\installdb

To build this example, navigate to directory SOLUTION_FILES\Cpp-C\Eta\Applications\Examples\VAConsumer and open & build the VAConsumer.vcxproj in the version of Visual Studio that you specified during the ESDK Build stage.

For Linux, run make in this directory.

The compiled output will be in a sub directory of the  <ESDK root>\Cpp-C\Eta\Executables\ directory - the exact sub directory name location will vary depending on your OS, compiler and build type etc.

Libcurl Library files

The ERT in Cloud connectivity example has a dependency on the Libcurl library - therefore you will need to ensure the example is able to load the relevant library file as follows:

For Linux

Add the relevant subdirectory (as determined by your OS and build type) to LD_LIBRARY_PATH e.g. for RHEL Optimized build, it could be something like:

export LD_LIBRARY_PATH=<ESDK root>/installdb/RHEL6_64_GCC444/Optimized/lib64

The exact directory path will be determined by where you have unpacked the SDK, your OS and build type.

For Windows

Copy the library files to the relevant Executables subdirectory e.g. for a Visual Studio 2017 Release build, it could be something like:

copy <ESDK root>\installdb\WIN_64_VS150\bin\*.*  <ESDK root>\install\Cpp-C\Eta\Executables\WIN_64_VS150\Release_MD

The exact directory paths will be determined by where you have unpacked the SDK, your Visual Studio version and build type . 

ERT in Cloud  Connectivity parameters and User credentials

In order to execute this step, you need to have a valid Username and Password for ERT in Cloud. When you subscribed to ERT in Cloud, you should have received a Welcome Email with your 'Machine ID' (i.e. user name) and a link to activate your account & set your password. If you have not already done so, activate your account and set your password.

If you do not have that email please contact your Refinitiv account team, or if you are not a client please click Contact Us page if you would like to try our Elektron Real Time in Cloud service.

The mininum required command line parameters for the VAConsumer example to connect to ERT in Cloud are as follows:

  •  -encryptedSocket  <hostname:port> <servicename>
  • domain:instrument  
  • your user name (Machine ID)  with the -uname  parameter
  • password you previously set with the  -passwd parameter
  •  -sessionMgnt parameter to perform authentication token management etc.

So, for example the following will connect to the emea-1 server and request MarketPrice data for IBM.N from the ELEKTRON_DD service

>VAConsumer -encryptedSocket emea-1.pricing.streaming.edp.thomsonreuters.com:14002 ELEKTRON_DD mp:IBM.N -uname <Username/Machine ID> -passwd <Password> -sessionMgnt

OR

>./VAConsumer -encryptedSocket emea-1.pricing.streaming.edp.thomsonreuters.com:14002 ELEKTRON_DD mp:IBM.N -uname <Username/Machine ID> -passwd <Password> -sessionMgnt

The RIC code IBM.N can be replaced with an alternative instrument - use the RIC Search page to identify the RIC code for your preferred instrument.

Upon execution, you should be presented with various  messages indicating Connection Up & Login sucess, followed by some Market Price data in the form of a 'RefreshMsg'.

Running the Example

Below, we  are connecting to the amer-1 server and requesting MarketPrice data for 'IBM.N' from the service 'ELEKTRON_DD':

>./>VAConsumer -encryptedSocket amer-1.pricing.streaming.edp.thomsonreuters.com:14002 ELEKTRON_DD mp:IBM.N -uname <Username/Machine ID> -passwd <Password> -sessionMgnt

Connections:
	amer-1.pricing.streaming.edp.thomsonreuters.com:14002 ELEKTRON_DD
		MarketPriceItems: IBM.N
		MarketByOrderItems:
		MarketByPriceItems:
		YieldCurveItems:
		MarketPriceItems (Private Stream):
		MarketByOrderItems (Private Stream):
		MarketByPriceItems (Private Stream):
		YieldCurveItems (Private Stream):

Unable to load field dictionary.  Will attempt to download from provider.
	Error Text: Can't open file: 'RDMFieldDictionary'.
Unable to load enum type dictionary.  Will attempt to download from provider.
	Error Text: Can't open file: 'enumtype.def'.

Adding connection to amer-1.pricing.streaming.edp.thomsonreuters.com:14002...
Connection up! Channel fd=704

Received Login Response
	State: Open/Ok/None - text: "Login accepted by host ads-premium-az1-green-8-main-prd.use1-az1."

Received Source Directory Response: 	State: Open/Ok/None - text: ""
Received serviceName: PERM_SVR_SNKDRV
Received serviceName: ELEKTRON_DD
	Service State: Up

Received Dictionary Response: RWFFld
Field Dictionary complete.
Received Dictionary Response: RWFEnum
Enumerated Types Dictionary complete.

(Channel 704): 
IBM.N
DOMAIN: RSSL_DMT_MARKET_PRICE
State: Open/Ok/None - text: "*All is well"
	PROD_PERM           62
	RDNDISPLAY          64
	DSPLY_NAME          INTL BUS MACHINE
	RDN_EXCHID          NYS(2)
	TRDPRC_1            139.030000
	TRDPRC_2            139.020000
	TRDPRC_3            139.020000
	TRDPRC_4            139.020000
	TRDPRC_5            139.020000
...
...
	ELG_ACVOL           131594
	ELG_TNOV            18313368.8600
	ODDTRN_UNS          2518486.4850
	TRNOVR_UNS          20831855.3450
	ACVOL_UNS           149692

(Channel 704): 
IBM.N
DOMAIN: RSSL_DMT_MARKET_PRICE
UPDATE TYPE: 1
	BID                 139.010000
	ASK                 139.070000
	BIDSIZE             2
	ASKSIZE             2
	BID_COND_N          R
	ASK_COND_N          R
	GV1_TEXT             
	LIMIT_INDQ             (0)
	PRC_QL_CD           R  (60)
...
...
	QUOTIM_MS           55871638
	QUOTIM              15:31:11:000:000:000
	SETL_TYPE           NRM(5)
	BOOK_STATE          N(1)
	ORDRECV_MS          15:31:11:638:000:000

The initial Refresh Msg (also known as initial image) contains all fields (above output is truncated) for the requested instrument representing the latest up-to-date market values. Following this image, you will begin to see Update Msgs i.e. realtime updates reflecting changes in the market. 

You can (Ctrl+C) to exit the application at any time.

Q&A

Q: How can I get an Elektron Data Platform username and password

A: Please contact your Refinitiv Account Manager or Technical Relationship Manager to help you to access EDP account and services.

Next Steps

Once you have successfully completed the steps above, you can further your learning by following the series of ETA tutorials.

Amazon Cloud

If you plan to run your ETA C++ application within the Amazon Cloud, you can refer to the Setting Up an Amazon EC2 instance article for details. Once you have setup the EC2 instance, based on the Refinitiv AMI, you can find scripts to run the above VAConsumer example within the Elektron-SDK sub-folder of the /home/ec2-user directory.

References

For further details, please check out the following resources:

For any question related to this quick start guide or Elektron Real Time in Cloud, please use the Developer Community Q&A Forum.