TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
ttsdk::IOrderBookEventHandler Class Reference

Interface for listening to order and position events. There is one OrderBookEventHandler set in the SDK. All order events will go to this handler unless a specific handler is set for specific orders on an order by order basis. More...

#include <order.h>

Inheritance diagram for ttsdk::IOrderBookEventHandler:
Collaboration diagram for ttsdk::IOrderBookEventHandler:

Public Member Functions

virtual ~IOrderBookEventHandler () noexcept=default
 
virtual void OnPositionUpdate (const Position &updatedPosition)
 Callback delivering position updates.
 
virtual void OnAccountDownloadEnd (const uint64_t accountId)
 Indicates the given account have been synchronized with the realtime streams, orders and positions have been downloaded.
 
virtual void OnAccountDownloadFailed (const uint64_t accountId, const char *message)
 Indicates the given account orders and positions downloads have failed and the account if not usable. This is a critical failure.
 
virtual void OnOrderBookDownloadEnd ()
 Indicates all orders and positions for all accounts are downloaded and synchronized with the realtime stream.
 
virtual void OnRiskReserved (const uint64_t instrumentId, const uint64_t accountId, const RiskSide side, const bool successful)
 Callback for a reserve risk request. Orders sent before a PR is acked will be rejected.
 
virtual void OnRiskReleased (const uint64_t instrumentId, const uint64_t accountId, const RiskSide side, const bool successful)
 Callback for a release reserve risk request.
 
- Public Member Functions inherited from ttsdk::IOrderEventHandler
virtual ~IOrderEventHandler () noexcept=default
 
virtual void OnExecutionReport (OrderPtr order, ExecutionReportPtr execRpt)=0
 Callback delivering execution report messages.
 
virtual void OnEpiqUpdate (OrderPtr order, double epiq)
 
virtual void OnExportValuesUpdate (OrderPtr order, const ttsdk::ExportValues &exports)
 
virtual void OnReject (OrderPtr order, RejectResponsePtr rejResp)=0
 Callback delivering order reject messages.
 
virtual void OnSendFailed (OrderPtr order, const OrderProfile &profile, const SendCode code)=0
 Callback fired when a request delivery surpasses the timeout threshold.
 
virtual void OnUnsubscribed (const char *orderId)=0
 Callback fired when the unsubscribe request is complete and it is safe to.
 

Additional Inherited Members

- Public Types inherited from ttsdk::IOrderEventHandler
enum  SendCode {
  SUCCESS , UNKNOWN , TIMEOUT , INVALID_ACCOUNT_FOR_MARKET ,
  INVALID_INSTRUMENT , NETWORK_FAILURE , SDK_NOT_INITIALIZED , ALREADY_IN_MARKET ,
  CHANGE_AFTER_CANCEL , ORDER_NOT_WORKING , PRICE_SUBSCRIPTION_REQUIRED , ORDER_MISSING_REQUIRED_DATA ,
  MALFORMED , ORDERBOOK_NOT_SYNCHRONIZED , RISK_NOT_READY , PRICE_SUBSCRIPTION_NOT_READY ,
  SYNTHETIC_ROUTING_NOT_AVAILABLE , ORDER_MISSING_MARKET_DATA , INVALID_ACCOUNT_ID , RESTRICTED_ACCOUNT ,
  EXCEEDED_PREALLOCATED_RISK , ORDER_THROTTLE_EXCEEDED , CHANGE_ACCOUNT_ID_NOT_ALLOWED , EXCEEDED_PREALLOCATED_RISK_CLIP_SIZE ,
  INVALID_CLIP_SIZE , CANCEL_INFLIGHT , INVALID_ACCOUNT_ID_FOR_LEG , RESTRICTED_ACCOUNT_ID_FOR_LEG
}
 

Detailed Description

Interface for listening to order and position events. There is one OrderBookEventHandler set in the SDK. All order events will go to this handler unless a specific handler is set for specific orders on an order by order basis.

Warning
It is assumed this object will exist for the life of the SDK.

Definition at line 245 of file order.h.

Constructor & Destructor Documentation

◆ ~IOrderBookEventHandler()

virtual ttsdk::IOrderBookEventHandler::~IOrderBookEventHandler ( )
virtualdefaultnoexcept

Member Function Documentation

◆ OnAccountDownloadEnd()

virtual void ttsdk::IOrderBookEventHandler::OnAccountDownloadEnd ( const uint64_t accountId)
inlinevirtual

Indicates the given account have been synchronized with the realtime streams, orders and positions have been downloaded.

Definition at line 255 of file order.h.

◆ OnAccountDownloadFailed()

virtual void ttsdk::IOrderBookEventHandler::OnAccountDownloadFailed ( const uint64_t accountId,
const char * message )
inlinevirtual

Indicates the given account orders and positions downloads have failed and the account if not usable. This is a critical failure.

Definition at line 260 of file order.h.

◆ OnOrderBookDownloadEnd()

virtual void ttsdk::IOrderBookEventHandler::OnOrderBookDownloadEnd ( )
inlinevirtual

Indicates all orders and positions for all accounts are downloaded and synchronized with the realtime stream.

Definition at line 264 of file order.h.

◆ OnPositionUpdate()

virtual void ttsdk::IOrderBookEventHandler::OnPositionUpdate ( const Position & updatedPosition)
inlinevirtual

Callback delivering position updates.

Definition at line 251 of file order.h.

◆ OnRiskReleased()

virtual void ttsdk::IOrderBookEventHandler::OnRiskReleased ( const uint64_t instrumentId,
const uint64_t accountId,
const RiskSide side,
const bool successful )
inlinevirtual

Callback for a release reserve risk request.

Definition at line 271 of file order.h.

◆ OnRiskReserved()

virtual void ttsdk::IOrderBookEventHandler::OnRiskReserved ( const uint64_t instrumentId,
const uint64_t accountId,
const RiskSide side,
const bool successful )
inlinevirtual

Callback for a reserve risk request. Orders sent before a PR is acked will be rejected.

Definition at line 268 of file order.h.


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