TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
ttsdk::IPriceEventHandler Class Referenceabstract

Interface for listening to price subscription events. More...

#include <prices.h>

Public Member Functions

virtual ~IPriceEventHandler (void) noexcept=default
 
virtual void OnPriceUpdate (const uint64_t subId, const InstrumentPtr &instrument, const PriceSnap &snap)=0
 Callback delivering price updates.
 
virtual void OnError (const uint64_t subId, const InstrumentPtr &instrument, const SubscriptionError code, const char *error)=0
 Callback fired when an error occurs fulfilling a price subscription request.
 
virtual void OnDisconnect (const uint64_t subId, const InstrumentPtr &instrument, const PriceEventType type)=0
 Callback fired when an disconnection event happens.
 
virtual void OnUnsubscribed (const uint64_t subId)=0
 Callback fired when the unsubscribe request is complete and it is safe to.
 

Detailed Description

Interface for listening to price subscription events.

Warning
Events are delivered on a thread managed by the SDK. The number of price delivery threads is set in the SDK options when initializing the SDK. Users can do work on this thread since they control how many threads there are and the threads are only for price events.

Definition at line 186 of file prices.h.

Constructor & Destructor Documentation

◆ ~IPriceEventHandler()

virtual ttsdk::IPriceEventHandler::~IPriceEventHandler ( void )
virtualdefaultnoexcept

Member Function Documentation

◆ OnDisconnect()

virtual void ttsdk::IPriceEventHandler::OnDisconnect ( const uint64_t subId,
const InstrumentPtr & instrument,
const PriceEventType type )
pure virtual

Callback fired when an disconnection event happens.

◆ OnError()

virtual void ttsdk::IPriceEventHandler::OnError ( const uint64_t subId,
const InstrumentPtr & instrument,
const SubscriptionError code,
const char * error )
pure virtual

Callback fired when an error occurs fulfilling a price subscription request.

◆ OnPriceUpdate()

virtual void ttsdk::IPriceEventHandler::OnPriceUpdate ( const uint64_t subId,
const InstrumentPtr & instrument,
const PriceSnap & snap )
pure virtual

Callback delivering price updates.

◆ OnUnsubscribed()

virtual void ttsdk::IPriceEventHandler::OnUnsubscribed ( const uint64_t subId)
pure virtual

Callback fired when the unsubscribe request is complete and it is safe to.


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