Market Data Clients C++ API
Market Data Application.

 
The goal of the API is simplicity in usage. A set of tutorials that exemplify the usage of the
API.

The tutorials assumes that you have some knowledge of C++ and boost libraries.

NOTE: I have worked on projects using expensive market data products, none of which have
an API as easy to use as this API. If you have any idea about making my API easier to use by
anyone wanting to writing a market data client application for our server please let me know
your needs.


Each example in the tutorial builds on the prior version.

Tutorial

Example 1. Display all options, futures, future options, stocks,  indexes, bonds, spreads,
calculated-indicators.

Example 2. Display the symbolic market and field names for all options, futures, future options,
stocks indexes, bonds, spreads and calculated-indicators.

Example 3.
Limiting the source of market information.

Example 4.
Limiting fields that are processed within a market.

Example 5.
High Low Open Close Volume and average volume. Now for a real world
application of the API. The complexity in the coding will come only from the logic to capture
High Low Open Close Volume, average price and volume over an interval of time. This type of
program is typical of what many traders use to create
Bar or Candle Stick Charts. I write this
program particularly for my friend Dr. Bruce Peters. But I am sure that many of you traders will
find this application useful to your daily trading needs.
The Boost Tuple Library: A
tuple (or n-tuple) is a fixed
size collection of elements.
Pairs, triples, quadruples etc.
are tuples. In a programming
language, a tuple is a data
object containing other
objects as elements. These
element objects may be of
different types.

Tuples are convenient in
many circumstances. For
instance, tuples make it easy
to define functions that return
more than one value.

Some programming
languages, such as ML,
Python and Haskell, have
built-in tuple constructs.
Unfortunately C++ does not.
To compensate for this
"deficiency", the Boost Tuple
Library implements a tuple
construct using templates.

boost::bind is a
generalization of the
standard functions
std::bind1st and std::bind2nd.
It supports arbitrary function
objects, functions, function
pointers, and member
function pointers, and is able
to bind any argument to a
specific value or route input
arguments into arbitrary
positions. bind does not
place any requirements on
the function object; in
particular, it does not need
the result_type,
first_argument_type and
second_argument_type
standard typedefs

Boost.Variant: The variant
class template is a safe,
generic, stack-based
discriminated union
container, offering a simple
solution for manipulating an
object from a heterogeneous
set of types in a uniform
manner. Whereas standard
containers such as std::vector
may be thought of as "multi-
value, single type," variant is
"multi-type, single value."

Notable features of boost::
variant include:

Full value semantics,
including adherence to
standard overload resolution
rules for conversion
operations.
Compile-time type-safe value
visitation via boost::
apply_visitor.
Run-time checked explicit
value retrieval via boost::get.
Support for recursive variant
types via both boost::
make_recursive_variant and
boost::recursive_wrapper.
Efficient implementation --
stack-based when possible
(see the section called
“"Never-Empty" Guarantee”
for more details).

Date Time: A set of date-time
libraries based on generic
programming concepts.


BOOST_FOREACH: In C++,
writing a loop that iterates
over a sequence is tedious.
We can either use iterators,
which requires a
considerable amount of
boiler-plate, or we can use
the std::for_each() algorithm
and move our loop body into
a predicate, which requires
no less boiler-plate and
forces us to move our logic
far from where it will be used.
In contrast, some other
languages, like Perl, provide
a dedicated "foreach"
construct that automates this
process. BOOST_FOREACH
is just such a construct for
C++. It iterates over
sequences for us, freeing us
from having to deal directly
with iterators or write
predicates