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

Interface for listening to sdk algo events. More...

#include <sdkalgo.h>

Public Member Functions

virtual ~ISDKAlgoManager () noexcept=default
 
virtual const charGetMarkets ()=0
 Returns the preferred markets for this instance in a comma separated list of market ids. The returns string should not be created on the stack in the method since it needs to exist outside the method call - it should be member or static data.
A null or empty return value indicates any market can be routed to this instance. A hard coded example for CME would be "7". For CME and ICE, "7,32".
 
virtual bool RecoverSDKAlgos () const
 Returns whether or not the SDK algos created in prior instance of the application should be recovered. If true, the reserve position will be recovered and OnRecovery will be called for each SDK algo order previosuly managed by this application. If false, all reserved risk for previous SDK algos will be cancelled and the SDK algo order will be failed by the SDK. In the no recovery case, OnRecovery will be called for the SDK algo orders so any working child orders can be attached but the SDK will fail the algo regardless of what is returned by the application. Default is false to Fail all the SDK algo orders on restart.
 
virtual void OnRecoverAlgo (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback when a working algo is downloaded on startup and need to be recovered.
 
virtual void OnRecoveryEnd ()=0
 Callback when all algos have been downloaded and OnRecoverAlgo called for each of them.
 
virtual void OnRecoveryFailed ()=0
 Callback when the previous algos can not be downloaded and recovered.
 
virtual void OnStartRequest (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback to start a new algo instance.
 
virtual void OnStopRequest (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback to stop an existiong algo instance.
 
virtual void OnUpdateRequest (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback when an update request is made for an existing algo.
 
virtual void OnPauseRequest (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback when a request to pause an algo is received. When an algo is in paused state,.
 
virtual void OnResumeRequest (SDKAlgoPtr algoOrder, SDKAlgoRequestPtr req)=0
 Callback when a request to restart a paused algo is received.
 
virtual void OnScheduledEvent (SDKAlgoPtr algoOrder, unsigned int eventId, void *eventUserData)=0
 Callback for an event scheduled by the user.An event is scheduled programmatically.
 
virtual void OnRiskReserved (SDKAlgoPtr algoOrder, const uint64_t instrumentId, const uint64_t accountId, const ttsdk::RiskSide side, const AlgoResponseCode code)
 Callback for a reserve risk request. Orders sent before a PR is acked will be rejected.
 
virtual void OnRiskReleased (SDKAlgoPtr algoOrder, const uint64_t instrumentId, const uint64_t accountId, const ttsdk::RiskSide side, const AlgoResponseCode code)
 Callback for a release reserve risk request.
 
virtual void OnAlgoCompleted (SDKAlgoPtr algoOrder)=0
 Callback when an algo is finished and should no longer be used. This will be called.
 

Detailed Description

Interface for listening to sdk algo events.

Definition at line 40 of file sdkalgo.h.

Constructor & Destructor Documentation

◆ ~ISDKAlgoManager()

virtual ttsdk::ISDKAlgoManager::~ISDKAlgoManager ( )
virtualdefaultnoexcept

Member Function Documentation

◆ GetMarkets()

virtual const char * ttsdk::ISDKAlgoManager::GetMarkets ( )
pure virtual

Returns the preferred markets for this instance in a comma separated list of market ids. The returns string should not be created on the stack in the method since it needs to exist outside the method call - it should be member or static data.
A null or empty return value indicates any market can be routed to this instance. A hard coded example for CME would be "7". For CME and ICE, "7,32".

◆ OnAlgoCompleted()

virtual void ttsdk::ISDKAlgoManager::OnAlgoCompleted ( SDKAlgoPtr algoOrder)
pure virtual

Callback when an algo is finished and should no longer be used. This will be called.

◆ OnPauseRequest()

virtual void ttsdk::ISDKAlgoManager::OnPauseRequest ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback when a request to pause an algo is received. When an algo is in paused state,.

◆ OnRecoverAlgo()

virtual void ttsdk::ISDKAlgoManager::OnRecoverAlgo ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback when a working algo is downloaded on startup and need to be recovered.

◆ OnRecoveryEnd()

virtual void ttsdk::ISDKAlgoManager::OnRecoveryEnd ( )
pure virtual

Callback when all algos have been downloaded and OnRecoverAlgo called for each of them.

◆ OnRecoveryFailed()

virtual void ttsdk::ISDKAlgoManager::OnRecoveryFailed ( )
pure virtual

Callback when the previous algos can not be downloaded and recovered.

◆ OnResumeRequest()

virtual void ttsdk::ISDKAlgoManager::OnResumeRequest ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback when a request to restart a paused algo is received.

◆ OnRiskReleased()

virtual void ttsdk::ISDKAlgoManager::OnRiskReleased ( SDKAlgoPtr algoOrder,
const uint64_t instrumentId,
const uint64_t accountId,
const ttsdk::RiskSide side,
const AlgoResponseCode code )
inlinevirtual

Callback for a release reserve risk request.

Definition at line 91 of file sdkalgo.h.

◆ OnRiskReserved()

virtual void ttsdk::ISDKAlgoManager::OnRiskReserved ( SDKAlgoPtr algoOrder,
const uint64_t instrumentId,
const uint64_t accountId,
const ttsdk::RiskSide side,
const AlgoResponseCode code )
inlinevirtual

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

Definition at line 88 of file sdkalgo.h.

◆ OnScheduledEvent()

virtual void ttsdk::ISDKAlgoManager::OnScheduledEvent ( SDKAlgoPtr algoOrder,
unsigned int eventId,
void * eventUserData )
pure virtual

Callback for an event scheduled by the user.An event is scheduled programmatically.

◆ OnStartRequest()

virtual void ttsdk::ISDKAlgoManager::OnStartRequest ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback to start a new algo instance.

◆ OnStopRequest()

virtual void ttsdk::ISDKAlgoManager::OnStopRequest ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback to stop an existiong algo instance.

◆ OnUpdateRequest()

virtual void ttsdk::ISDKAlgoManager::OnUpdateRequest ( SDKAlgoPtr algoOrder,
SDKAlgoRequestPtr req )
pure virtual

Callback when an update request is made for an existing algo.

◆ RecoverSDKAlgos()

virtual bool ttsdk::ISDKAlgoManager::RecoverSDKAlgos ( ) const
inlinevirtual

Returns whether or not the SDK algos created in prior instance of the application should be recovered. If true, the reserve position will be recovered and OnRecovery will be called for each SDK algo order previosuly managed by this application. If false, all reserved risk for previous SDK algos will be cancelled and the SDK algo order will be failed by the SDK. In the no recovery case, OnRecovery will be called for the SDK algo orders so any working child orders can be attached but the SDK will fail the algo regardless of what is returned by the application. Default is false to Fail all the SDK algo orders on restart.

Definition at line 60 of file sdkalgo.h.


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