EPAM B2BITS ICE Impact Handler C++  1.1.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Market Data Handler API

Functions

virtual bool IceImpact::Application::start (int waitTimeS=0)=0
 Starts market data services. More...
 
virtual std::string IceImpact::Application::getMarketTypeDescription (IceImpact::MarketTypeValue marketType)=0
 Returns description of a Market Type. More...
 
virtual IceImpact::MarketTypeValue IceImpact::Application::getMarketTypeByDescription (const std::string &marketType)=0
 Returns Market Type ID by description. More...
 
virtual bool IceImpact::Application::requestProductDefinitions (IceImpact::u64 requestTag, const UserRequestMarketTypesSet &marketTypeSet, int waitTimeS, InstrumentLoadParams *instrumentLoadParams=NULL)=0
 
virtual bool IceImpact::Application::requestProductDefinitionsForAllMarkets (IceImpact::u64 requestTag, int waitTimeS, InstrumentLoadParams *instrumentLoadParams=NULL)=0
 Requests all market types products' definitions. More...
 
virtual const ProductDirectoryPtr IceImpact::Application::getProductDirectory ()=0
 Returns a ref-counted pointer to operational product directory. More...
 
virtual bool IceImpact::Application::isBookTypeSupported (IceImpact::Int32 marketID, bool useFullImplied, BookDepth bookDepth)=0
 
virtual void IceImpact::Application::subscribeToInstrument (const std::string &symbol, bool useFullImplied, BookDepth bookDepth, subscription_mask_t subscrMask, unsigned long long UserCookie)=0
 
virtual void IceImpact::Application::subscribeToInstrument (IceImpact::MarketID marketID, bool useFullImplied, BookDepth bookDepth, subscription_mask_t subscrMask, unsigned long long UserCookie)=0
 
virtual void IceImpact::Application::unsubscribeFromInstrument (const std::string &symbol, bool useFullImplied, BookDepth bookDepth, subscription_mask_t subscrMask=SubscriptionType::ALL, bool disconnectIfNoMoreSubscribed=true)=0
 
virtual void IceImpact::Application::unsubscribeFromInstrument (IceImpact::MarketID marketID, bool useFullImplied, BookDepth bookDepth, subscription_mask_t subscrMask=SubscriptionType::ALL, bool disconnectIfNoMoreSubscribed=true)=0
 
virtual bool IceImpact::Application::getInstrumentBBO (const std::string &symbol, bool useFullImplied, BBOSnapshot &bbo, enum BookDepth depth=PriceLevelDepth)=0
 
virtual bool IceImpact::Application::getInstrumentBBO (IceImpact::MarketID marketID, bool useFullImplied, BBOSnapshot &bbo, enum BookDepth depth=PriceLevelDepth)=0
 
virtual bool IceImpact::Application::getInstrumentTOP5Prices (IceImpact::MarketID marketID, bool useFullImplied, TOP5PriceData &top5data, unsigned long long *UserCookie, enum BookDepth depth=PriceLevelDepth)=0
 
virtual bool IceImpact::Application::getInstrumentTOP10Prices (IceImpact::MarketID marketID, bool useFullImplied, TOP10PriceData &top10data, unsigned long long *UserCookie, enum BookDepth depth=PriceLevelDepth)=0
 
virtual bool IceImpact::Application::getInstrumentTOP5Prices (const std::string &symbol, bool useFullImplied, TOP5PriceData &top5data, unsigned long long *UserCookie, enum BookDepth depth=PriceLevelDepth)=0
 
virtual bool IceImpact::Application::getSubscription (const std::string &symbol, bool useFullImplied, BookDepth bookDepth, subscription_mask_t &mask)=0
 Get the instrument's current subscription mask. More...
 
virtual bool IceImpact::Application::getSubscription (IceImpact::MarketID marketID, bool useFullImplied, BookDepth bookDepth, subscription_mask_t &mask)=0
 Get instrument subscription mask. More...
 
virtual void IceImpact::Application::release () const =0
 

Detailed Description

Function Documentation

virtual bool IceImpact::Application::getInstrumentBBO ( const std::string &  symbol,
bool  useFullImplied,
BBOSnapshot bbo,
enum BookDepth  depth = PriceLevelDepth 
)
pure virtual

getInstrumentBBO by symbol With SubscriptionParams::tickerPlantMode enabled returns the BBO data regardless if instrument was previously subscribed or not.

Parameters
symbolto get data for
useFullImpliedwhether the multicast group is fully implied
bbo
depth- pass PriceLevelDepth for Futures(TOP5 book) and Options(TOB book), pass PriceLevelDepth10 for Options TOP10 book
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::getInstrumentBBO ( IceImpact::MarketID  marketID,
bool  useFullImplied,
BBOSnapshot bbo,
enum BookDepth  depth = PriceLevelDepth 
)
pure virtual

getInstrumentBBO by marketID With SubscriptionParams::tickerPlantMode enabled returns the BBO data regardless if instrument was previously subscribed or not.

Parameters
marketIDto get data for
useFullImpliedwhether the multicast group is fully implied
bbo
depth- pass PriceLevelDepth for Futures(TOP5 book) and Options(TOB book), pass PriceLevelDepth10 for Options TOP10 book
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::getInstrumentTOP10Prices ( IceImpact::MarketID  marketID,
bool  useFullImplied,
TOP10PriceData top10data,
unsigned long long *  UserCookie,
enum BookDepth  depth = PriceLevelDepth 
)
pure virtual

getInstrumentTOP10Prices by marketID With SubscriptionParams::tickerPlantMode enabled returns data regardless if instrument was previously subscribed or not.

See Also
getInstrumentTOP5Prices
Parameters
marketIDto get data for
useFullImpliedwhether the multicast group is fully implied
depthshould be set to PriceLevelDepth for Futures TOP5/Options TOB, and PriceLevel10Depth for Options TOP10
See Also
BBOUpdateEvent::depth
Parameters
top10dataTOP10 levels of the price book
UserCookieUser cookie supplied when subscribing to the insttrument
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::getInstrumentTOP5Prices ( IceImpact::MarketID  marketID,
bool  useFullImplied,
TOP5PriceData top5data,
unsigned long long *  UserCookie,
enum BookDepth  depth = PriceLevelDepth 
)
pure virtual

getInstrumentTOP5Prices by marketID With SubscriptionParams::tickerPlantMode enabled returns data regardless if instrument was previously subscribed or not.

See Also
getInstrumentTOP10Prices
Parameters
marketIDto get data for
useFullImpliedwhether the multicast group is fully implied
top5dataTOP5 levels of the price book
UserCookieUser cookie supplied when subscribing to the insttrument
depthshould be set to PriceLevelDepth for Futures TOP5/Options TOB, and PriceLevel10Depth for Options TOP10
See Also
BBOUpdateEvent::depth
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::getInstrumentTOP5Prices ( const std::string &  symbol,
bool  useFullImplied,
TOP5PriceData top5data,
unsigned long long *  UserCookie,
enum BookDepth  depth = PriceLevelDepth 
)
pure virtual

getInstrumentTOP5Prices by symbol With SubscriptionParams::tickerPlantMode enabled returns data regardless if instrument was previously subscribed or not.

Parameters
symbolto get data for
useFullImpliedwhether the multicast group is fully implied
top5dataTOP5 levels of the price book
UserCookieUser cookie supplied when subscribing to the insttrument
depthshould be set to PriceLevelDepth for Futures TOP5/Options TOB, and PriceLevel10Depth for Options TOP10
See Also
BBOUpdateEvent::depth
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual IceImpact::MarketTypeValue IceImpact::Application::getMarketTypeByDescription ( const std::string &  marketType)
pure virtual

Returns Market Type ID by description.

Parameters
marketTypeMarket type
Returns
ID or 0 if not found
Exceptions
no
virtual std::string IceImpact::Application::getMarketTypeDescription ( IceImpact::MarketTypeValue  marketType)
pure virtual

Returns description of a Market Type.

Parameters
marketTypeMarket type
Returns
description string or empty string if market type isn't found
Exceptions
no
virtual const ProductDirectoryPtr IceImpact::Application::getProductDirectory ( )
pure virtual

Returns a ref-counted pointer to operational product directory.

Returns
ProductDirectoryPtr
Exceptions
no
virtual bool IceImpact::Application::getSubscription ( const std::string &  symbol,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t mask 
)
pure virtual

Get the instrument's current subscription mask.

Parameters
symbolname of the instrument
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
masksubscription mask
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::getSubscription ( IceImpact::MarketID  marketID,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t mask 
)
pure virtual

Get instrument subscription mask.

Parameters
marketIDto get for
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
masksubscription mask
Returns
true if instrument is found, false otherwise
Exceptions
std::runtime_error
virtual bool IceImpact::Application::isBookTypeSupported ( IceImpact::Int32  marketID,
bool  useFullImplied,
BookDepth  bookDepth 
)
pure virtual

Checks if specific book type and full implied flag is supported for given marketID This method should be called after requestProductDefinitions() is called for appropriate markets

Parameters
marketIDId of the market
useFullImpliedwhatever multicast group is fully implied
bookDepthdepth of book to use
Returns
true if book / full implied data is supported for this marketID
Exceptions
no
virtual void IceImpact::Application::release ( ) const
pure virtual

Destroys application Note: this function should not be called from user callbacks (onBBO(), etc) to avoid potental deadlock situation Disconnects and destroys all running services and threads.

Note
Method is synchronous and will wait for some threads to quit. Calling this method from ApplicationListener callbacks will lead to a deadlock.
Exceptions
no
virtual bool IceImpact::Application::requestProductDefinitions ( IceImpact::u64  requestTag,
const UserRequestMarketTypesSet marketTypeSet,
int  waitTimeS,
InstrumentLoadParams instrumentLoadParams = NULL 
)
pure virtual

Request market types products definitions by TCP or load them from a file on disk onProductDefinitionsAvail is called when the request has been processed.

Parameters
requestTaguser request tag. This value is passed back to onProductDefinitionsAvail callback routine.
marketTypeSetset of market types to request definitions for. This value is passed back to callback routine.
waitTimeSwait specified time for completion. -1 means wait forever. 0 means exit immediately.
instrumentLoadParamsparameters controlling file cache usage. Default value: NULL, means don't use cache.
Returns
true if request was successful and finished in requested time, false otherwise.
Exceptions
no
virtual bool IceImpact::Application::requestProductDefinitionsForAllMarkets ( IceImpact::u64  requestTag,
int  waitTimeS,
InstrumentLoadParams instrumentLoadParams = NULL 
)
pure virtual

Requests all market types products' definitions.

Parameters
requestTaguser request tag. This value is passed back to onProductDefinitionsAvail callback routine.
waitTimeSwait specified time for completion. -1 means wait forever. 0 means exit immediately.
instrumentLoadParamsparameters controlling cache usage. Default value: NULL, means don't use cache.
Returns
true if request was successful and finished in requested time, false otherwise.
Exceptions
no
virtual bool IceImpact::Application::start ( int  waitTimeS = 0)
pure virtual

Starts market data services.

Parameters
waitTimeSwait specified time for completion. -1 means wait forever. 0 means exit immediately.
Returns
true if market types arrived successfully and in requested time, false otherwise.
Exceptions
no
virtual void IceImpact::Application::subscribeToInstrument ( const std::string &  symbol,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t  subscrMask,
unsigned long long  UserCookie 
)
pure virtual

Subscribe to a symbol. This call OR's current instrument subscription mask with the passed value. When called intra-day will trigger Snapshot recovery procedure unless SubscriptionParams::tickerPlantMode was enabled. Note: this function should not be called from user callbacks (onBBO(), etc) to avoid potental deadlock situation

Parameters
symbolto subscribe to
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
subscrMask
UserCookie
Returns
void
Exceptions
std::runtime_error
virtual void IceImpact::Application::subscribeToInstrument ( IceImpact::MarketID  marketID,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t  subscrMask,
unsigned long long  UserCookie 
)
pure virtual

Subscribes to symbol by marketID. This call OR's current instrument subscription mask with the passed value. When called intra-day will trigger Snapshot recovery procedure unless SubscriptionParams::tickerPlantMode was enabled. Note: this function should not be called from user callbacks (onBBO(), etc) to avoid potental deadlock situation

Parameters
marketIDto subscribe to
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
subscrMask
UserCookie
Returns
void
Exceptions
std::runtime_error
virtual void IceImpact::Application::unsubscribeFromInstrument ( const std::string &  symbol,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t  subscrMask = SubscriptionType::ALL,
bool  disconnectIfNoMoreSubscribed = true 
)
pure virtual

Unsubscribes from symbol Note: this function should not be called from user callbacks (onBBO(), etc) to avoid potental deadlock situation

Parameters
symbolto unsubscribe from. This call removes passed subscriptions bits from the current instrument's subscription mask.
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
subscrMasksubscription mask to use
disconnectIfNoMoreSubscribedwill disconnect the service from UDP Multicast source if this has been the last instrument subscribed provided service is not in ticker plant mode
See Also
SubscriptionParams::tickerPlantMode
Returns
void
Exceptions
std::runtime_error
virtual void IceImpact::Application::unsubscribeFromInstrument ( IceImpact::MarketID  marketID,
bool  useFullImplied,
BookDepth  bookDepth,
subscription_mask_t  subscrMask = SubscriptionType::ALL,
bool  disconnectIfNoMoreSubscribed = true 
)
pure virtual

Unsubscribes from symbol by marketID. This call removes passed subscriptions bits from the current instrument's subscription mask. Note: this function should not be called from user callbacks (onBBO(), etc) to avoid potental deadlock situation

Parameters
marketIDto unsubscribe from
useFullImpliedwhether the multicast group is fully implied
bookDepthdepth of book to use
subscrMask
disconnectIfNoMoreSubscribedwill disconnect the service from UDP Multicast source if this has been the last instrument subscribed provided service is not in ticker plant mode
See Also
SubscriptionParams::tickerPlantMode
Returns
void
Exceptions
std::runtime_error