OnixS Eurex ETI Handler C++ library 9.29.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Quick Start

All the Handler classes are encapsulated into the OnixS::Eurex::Trading namespace. Header files are collected in the master OnixS/Eurex/Trading.h header file.

How to get started

The typical way of using the Handler is as follows:

  • Create an instance of HandlerSettings class and adjust Handler's settings.
  • Create an instance of Handler class using previously initialized instance of HandlerSettings.
  • Register error and warning listener to be notified about failures occurred while the Handler processes market data.
  • Register listeners for miscellaneous trading events.
  • Create an instance of Logon class and adjust session settings.
  • Assign Logon::password field with plain text password, and, to use password encrypted session logon, Logon::publicKeyPath field with the path to the RSA public key file.
  • Establish the connection using the Handler::connect method.
  • Create an instance of UserLoginRequest class and adjust user logon settings.
  • Send user login request using Handler::send method.
  • Start sending messages.
  • Create an instance of UserLogoutRequest class and adjust user logout settings.
  • Send user logout request using Handler::send method.
  • Terminate the connection to Eurex ETI using the Handler::disconnect method.

Session Logon (Plain text password)

The Handler supports plain test password session logon. To use this feature, the following steps should be performed:

Session Logon (Password encrypted)

The Handler supports password encrypted session logon. To use this feature, the following steps should be performed:

You will find the RSA public keys for Production and Simulation in the samples/Keys directory.

using namespace OnixS::Eurex::Trading;
HandlerSettings handlerSettings;
// Reconnect automatically after a connection loss.
handlerSettings.connectionRetries.number = 3;
handlerSettings.connectionRetries.interval = 5;
Handler handler(handlerSettings);
Logon logon;
logon.partyIdSessionId = 12345;
// The plain text password and the key to encrypt it with. The Handler
// encrypts the password anew before every session logon, the automatic
// reconnects included.
logon.password = "password";
logon.publicKeyPath = "samples/Keys/Simulation/eti_pwd_9523001_pub.pem";
handler.connect("host", 19000, logon);

An encrypted password embeds the timestamp of the moment it was encrypted, and the exchange accepts it only within a grace period. The Handler therefore encrypts Logon::password anew before every session logon: the first one, each automatic reconnect, and a failover to the secondary gateway. The key file is read each time, so it has to stay readable while the Handler is connected. If it cannot be read or used at a reconnect, the Handler reports the error through ErrorListener and stops reconnecting.

Pre-encrypted password (deprecated)

Logon::encryptedPassword is deprecated. The Handler sends its value unchanged on every session logon, so a reconnect or a failover after the grace period is rejected with the Password timestamp not in grace period session reject reason and the gateway closes the connection. Every remaining connection retry is rejected the same way, so the session is not restored. Assign Logon::password and Logon::publicKeyPath instead; when both Logon::publicKeyPath and Logon::encryptedPassword are set, the Handler uses the key and logs a warning.

User Login (Password encrypted)

The UserLoginRequestEncrypted message is sent by the application, so the application encrypts its password with Handler::encryptPassword. Build the message right before sending it, and never resend one built for an earlier connection: its timestamp is subject to the same grace period.

using namespace OnixS::Eurex::Trading;
// Built right before it is sent, so that the encrypted password carries a
// current timestamp.
userLogin.username = 12345;
"password",
"samples/Keys/Simulation/eti_pwd_9523001_pub.pem"
);
handler.send(userLogin);

Please also see section 5.3.3 Password Encryption of Enhanced Trading Interface (ETI) Manual to get more information about password encryption.