This document is a developer’s guide for the CME STP API library.
The CME STP API library requires the following software installed on computer:
- Microsoft .NET Framework 4.0
- Unpack the package and copy CMESTPapi.dll and Log4Net files
- Add reference to CMESTPapi.dll in your .NET project
To replace the default logging settings you should specify the parameters in the %Application%\com.b2bits.CMESTP.Configuration.xml file.
- Open %Application%\com.b2bits.CMESTP.Configuration.xml file
Find the following section:
- Replace the value of tag <Path> if you need to move the log file location
- Replace the value of tag <LogLevel> if you need to change the logging level:
Supported values are:
Error – log the errors only
Warning - log the errors and warnings
Info - log the errors, warnings and information messages
Debug – log everything
URI of the FIXML API
Connection timeout of FIXML API connect (in seconds)
Returns string representation of current configuration
<No default value, automatically will be set to current time minus 24 hours (in time zone of CME)>
The timestamp of last received trade.
ID of Party that is the subject of the subscription
Indicates the type or role of the Party that is the subject of the subscription
FIXML API password
The frequency of pooling of the FIXML API (in seconds)
Amount of retries if connection was lost.
The timeout between recovery attempts if any problem occurs during the pooling action (in milliseconds)
FIXML API login
Using the CMESTPapi library
To use the library you should create the instance of CMEApiConfiguration object and fill in the desired configuration values. XML serialization could be used to load configuration settings from file.
Next, create the instance of CMESTPapi object with created above configuration as parameter. Subscribe to onTrade event.
Call Start() method to start polling. Process received Trade messages in onTrade event handler. Call Stop() to stop polling.