Real-Time Ultra Direct
Prerequisites
Red Hat Enterprise Linux (RHEL) and CentOS instances of Linux require the following tools to compile the Real-Time - Ultra Direct C++ code:
- cmake version 3.4 or greater (available at https://cmake.org/download/).
- gcc and make – These can be obtained by installing the development tools group. To install:
sudo yum -y groupinstall “ Development Tools "
Ubuntu and Suse instances of Linux require the following tools to compile the Real-Time - Ultra Direct C++ code:
- cmake version 3.4 or greater (available at https://cmake.org/download/).
- gcc and make – These can be obtained by installing the build-essentials group, as follows:
sudo apt - get install build – essential
Tickers
Tickers in RTUD serve as customizable example C++ application code that facilitate the extraction of specific information or messages from market data feeds. By subscribing to desired normalized messages such as Add Orders, Modify orders, Cancel Orders, Trade messages, and Aggregate Price Updates, users can conveniently receive relevant data and trigger actions based on the received information.
Code Example:
A simple example is provided here. Further explanation of tickers is provided in the coming sections.
To run the Total View Ticker on live data, use the following command on a relevant terminal in your operating system:
total_view_ticker -- products GOOG AAPL --license - file demo .lic
To run Total View Ticker on stored pcap data, utilize the following command:
total_view_ticker -- products GOOG AAPL --license - file demo .lic --pcaps ~/ data /20130301 /* eth4 *. pcap
In the provided code snippet, “total_view_ticker” refers to the executable file. “GOOG” and “AAPL” parameters represent the subscribed products or specific financial instruments. The “—license-file” flag specifies the required license file for access, while the “—pcaps” flag indicates the location of stored pcap data for data replay.
Summary of Real-Time-Ultra Direct
Real-Time - Ultra Direct (RTUD) is the modular software library of exchange data feed handlers developed and maintained by Refinitiv. Included in the RTUD product line is a set of separate support applications.
RTUD feed handlers, often in concert with modules from Refinitiv’s product line, support the ingestion and transformation of high-integrity, low-latency market data from exchanges and feed providers to financial market participants around the world. Hundreds of diverse data feeds distributed by dozens of global exchanges across a broad swath of instrument classes are supported in RTUD.
A “feed handler” is generally defined as a software apparatus designed to ingest streaming data from a specific source (often sent via a proprietary protocol and format) and then transform that data so that it is acceptable for processing in a specific environment. Streaming data in the market data sector is broadcast (either as multicast packet sequences or as TCP streams) and this traffic can be stored by the subscribing party in packet capture (.pcap) file format. Feed handler processing of exchange data from a network device can occur in near-real time, or “replayed” later from a stored .pcap file.
Major functions of a feed-handler are:
- Data feed arbitration - Most feed sources send out a multicast of their feed. It also assesses when data is missing and proceeds with corrective actions like requesting missing packages or the snapshot including missing information.
- Timestamping - Highly-precise timestamping of multicast market data is a critical requirement of any feed handler. Each incoming record (trade, bid, offer, cancel, etc.) must be accurately timestamped for reliable usage in today’s finely-calibrated financial analysis platforms. RTUD can be configured for use with GPS time reference for high-precision timestamping, providing across-the-board nanosecond-level accuracy.
- Data normalization - Each feed handler in the Real-Time - Ultra Direct library has as its output an ongoing sequence of normalized messages. Normalized messages, transformed versions of the incoming market data messages, take the same format for all incoming feeds, providing Refinitiv customers with a single message format for their data usage across exchanges. Real-Time - Ultra Direct’s normalized messages are dispatched to the user platform in the form of high-speed programmatic callbacks.
- Data storage - Feed handling can include the archiving of the incoming feed data in its captured .pcap file format. This storage/retention allows for the re-processing of the data (sometimes referred to as data “replay”) at a future time for backtesting and analysis.
Feed-handlers capture the messages broadcasted by the exchange venues through “devices.” It can refer to either the physical input apparatus itself or the C++ program module that support that physical device. In short, packets are passed from a device to feed instances.
Depending on the business requirements, users might choose to get the feed in mainly three different formats:
- Raw data: This is the lowest level of data distributed by the exchange. Technically speaking, exchange feeds are in many cases simply C style structs around the data distributed on the network by the exchange.
- Normalized messages: The raw data packages are processed and transformed into a format that is consistent across different venues and easily readable and consumable by users. Normalized messages make it easier to work on financial products that trade across different venues (e.g. commodity futures). RTUD has built-in functionalities and accommodative tools to achieve that.
- Aggregated prices: The users get both normalized and aggregated order book data. Users can subscribe to the top of the order book or to book changes at a specific book level.
Quick Set up
RTUD software builds are made available to clients via Refinitiv’s FTP account, along with the Real-Time – Ultra Direct software resources and license files. The RTUD build is a single compressed file constructed by Refinitiv specifically for each customer, containing all the necessary Real-Time - Ultra Direct artifacts needed to run the system. Builds are to be downloaded, decompressed and compiled (where applicable) by the customer.
Each RTUD build includes an example folder, containing example C++ ticker code for each licensed feed handler in the build.
Compiling the Code
Red Hat Enterprise Linux (RHEL) and CentOS instances of Linux require the following tools to compile the Real-Time - Ultra Direct C++ code:
- cmake version 3.4 or greater (available at https://cmake.org/download/).
- gcc and make – These can be obtained by installing the development tools group.
To install:
sudo yum -y groupinstall “ Development Tools "
Ubuntu and Suse instances of Linux require the following tools to compile the Real-Time - Ultra Direct C++ code:
- cmake version 3.4 or greater (available at https://cmake.org/download/).
- gcc and make – These can be obtained by installing the build-essentials group, as follows:
sudo apt - get install build – essential
Compile example – Linux
cd Real - Time - Ultra Direct_PACKAGE_ROOT / example
mkdir build_debug
cd build_debug
cmake - DCMAKE_BUILD_TYPE = Debug ../
cd ..
mkdir build_release
cd build_release
cmake - DCMAKE_BUILD_TYPE = Release ../
make
Compile example – Windows
cd Real - Time - Ultra Direct_PACKAGE_ROOT / example
mkdir build
cd build
cmake -G “ Visual Studio 16 2019 ” -A x64 ../
Real-Time - Ultra Direct feed handlers dispatch normalized exchange messages (including transaction and book maintenance messages) to subscribers in the form of programmatic callback messages. When it is casually said that a subscriber “received” a trade message, or a cancel message, or a bid/offer message, it means a callback message indicating that action was received by them.
Callback messages are generated by the C++ code in which Real-Time - Ultra Direct feed handlers are built. In short, a callback is an executable code block that is passed as an argument to other code which “calls back” (i.e., executes) the argument. The entity which receives and executes the Real-Time - Ultra Direct callback message is the subscriber’s data application. Upon detection of the callback, the customer’s software invokes the appropriate actions to adjust the book for the referenced product
Tickers
Tickers are example C++ code, setup to work immediately and contain example usage of the C++ RTUD API. The below instructions show how the example tickers are run for live and historical processing. The “total_view_ticker.cpp” is the example ticker for the Nasdaq TotalView market data feed, which includes the full order book depth, every single quote and order at every price level in Nasdaq-, NYSE-, NYSE American- and regional-listed securities trading on Nasdaq.
Ticker Launch:
To illustrate, the example below shows how to run the total_view_ticker executable file with the parameters for both live and on stored pcap data. Total_view_ticker is the feed-handler for the Nasdaq’s full order book Total View feed which includes every single quote and order at every price level in Nasdaq-, NYSE-, NYSE American- and regional-listed securities trading on Nasdaq.
To run live:
total_view_ticker -- products GOOG AAPL --license - file demo .lic
To run from pcap:
total_view_ticker -- products GOOG AAPL --license - file demo .lic --pcaps ~/ data /20130301 /* eth4 *. pcap