libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
isimud::ISIMUD_VER_NAMESPACE::smart_order_router Class Reference

An idea for implementing a very simple smart order router. More...

#include <smart_order_router.hpp>

Classes

struct  available_to_trade
 

Public Types

using link_t = int
 Base class of all the links. More...
 
using link_ptr_t = link_t *
 
using container_type = std::map< exchanges::ISIN_t, std::map< available_to_trade, link_ptr_t > >
 

Public Member Functions

void market_data_update (ISIN_t const &, available_to_trade::price_t const &, available_to_trade::volume_t const &)
 The market-data thread receives updates for the subscribed ISINs and calls this function to update the internal container. More...
 
void place_an_order (...) noexcept(false)
 Call to place an order via the SOR. More...
 

Detailed Description

An idea for implementing a very simple smart order router.

Definition at line 29 of file smart_order_router.hpp.

Member Typedef Documentation

◆ container_type

A collection that contains the ISINs that are tradeable on multiple exchanges ordered by ISIN->{price, volume}->link. So that as market data comes in the prices & available volumes are updated.

May want to use a sorted vector instead....

Definition at line 44 of file smart_order_router.hpp.

◆ link_ptr_t

◆ link_t

Base class of all the links.

Definition at line 37 of file smart_order_router.hpp.

Member Function Documentation

◆ market_data_update()

void isimud::ISIMUD_VER_NAMESPACE::smart_order_router::market_data_update ( ISIN_t const &  ,
available_to_trade::price_t const &  ,
available_to_trade::volume_t const &   
)

The market-data thread receives updates for the subscribed ISINs and calls this function to update the internal container.

Re-insert the ISIN into the map with the updated details.

◆ place_an_order()

void isimud::ISIMUD_VER_NAMESPACE::smart_order_router::place_an_order (   ...)
noexcept

Call to place an order via the SOR.

Places the trade on the venue that has the best price & most volume. Could split the trade between venues.


The documentation for this class was generated from the following file: