TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
tt_cplus_sdk.h File Reference
#include <sys/types.h>
#include "consts.h"
#include "sdk_options.h"
#include "account.h"
#include "customer_profile.h"
#include "instrument.h"
#include "algo_definition.h"
#include "instrument_search.h"
#include "prices.h"
#include "order.h"
#include "fill.h"
#include "position.h"
#include "connection.h"
#include "enums/MarketId.h"
#include "sdkalgo.h"
Include dependency graph for tt_cplus_sdk.h:

Go to the source code of this file.

Classes

class  ttsdk::IEventHandler
 

Namespaces

namespace  ttsdk
 

Macros

#define DEPRECATE_SUPER_STRING
 
#define SUPER_STRING_IS_STD_STRING
 

Typedefs

using ttsdk::IEventHandlerPtr = IEventHandler*
 

Enumerations

enum  ttsdk::LogLevel {
  ttsdk::LogDebug = 0 , ttsdk::LogInfo = 10 , ttsdk::LogWarning = 20 , ttsdk::LogError = 30 ,
  ttsdk::LogCritical = 40 , ttsdk::LogAlways = 100
}
 

Functions

bool ttsdk::Initialize (const TTSDKOptions &options, IEventHandlerPtr sdkEventObserver, IOrderBookEventHandlerPtr orderHandler, ISDKAlgoManagerPtr algoManager=nullptr) noexcept
 Initialize the TT CoreSDK shared library.
 
void ttsdk::Shutdown () noexcept
 Shutdown the TT CoreSDK shared library.
 
const charttsdk::Version () noexcept
 Returns the version of the SDK.
 
void ttsdk::TTLogInfo (const char *format,...) __attribute__((format(printf
 
void void ttsdk::TTLogWarning (const char *format,...) __attribute__((format(printf
 
void void void ttsdk::TTLogError (const char *format,...) __attribute__((format(printf
 
void void void void ttsdk::TTLog (const LogLevel level, const char *category, const char *msg)
 
AccountCollectionPtr ttsdk::GetAccounts ()
 Returns the user accounts.
 
CustomerProfileCollectionPtr ttsdk::GetCustomerProfiles ()
 Returns the CustomerProfiles.
 
InstrumentPtr ttsdk::GetInstrument (const uint64_t instrumentId, Instrument::ResponseCode &code)
 Gets the instrument definition (active only).
 
InstrumentPtr ttsdk::GetInstrument (const MarketId market, const char *product, const ProductType type, const char *alias, Instrument::ResponseCode &code)
 Gets the instrument definition (active only).
 
InstrumentSearchResultsPtr ttsdk::SearchInstruments (const char *query, const char *markets, Instrument::ResponseCode &code)
 Searches for instrument (active only).
 
AlgoDefinitionPtr ttsdk::GetAlgoDefinition (const char *algoName, AlgoDefinition::ResponseCode &code)
 Gets the algo definition (active only).
 
OrderPtr ttsdk::CreateOrderFromPriceSub (uint64_t priceSubscriptionId)
 Create orders for exchange or synthetic (ASE/AGG) instruments.
 
OrderPtr ttsdk::CreateOrder (InstrumentPtr instrument)
 
OrderPtr ttsdk::CreateOrder (uint64_t instrumentId)
 
OrderPtr ttsdk::CreateAlgoOrder (AlgoDefinitionPtr algo, InstrumentPtr instrument)
 Create order for an ADL Algo (akin to launching an algo in the gui)
 
OrderPtr ttsdk::CreateAlgoOrder (AlgoDefinitionPtr algo, uint64_t instrumentId=0)
 
bool ttsdk::DownloadFills (IFillDownloadCallbackHandlerPtr obj, const uint64_t accountId=0, const ttsdk::MarketId marketId=ttsdk::MarketId::INVALID, const uint64_t minTimestamp=0, const uint64_t maxTimestamp=0, const char *orderId=nullptr)
 
uint64_t ttsdk::SubscribePrices (InstrumentPtr instrument, const uint16_t depth, const bool implieds, const bool allowTTImplieds, const bool includeSimPrices, IPriceEventHandlerPtr listener) noexcept
 
uint64_t ttsdk::SubscribePrices (uint64_t instrumentId, const uint16_t depth, const bool implieds, const bool allowTTImplieds, const bool includeSimPrices, IPriceEventHandlerPtr listener) noexcept
 
void ttsdk::UnsubscribePrices (const uint64_t subscriptionId) noexcept
 
uint64_t ttsdk::SubscribeTimeAndSales (InstrumentPtr instrument, const bool includeSimPrices, ITimeSalesEventHandlerPtr listener) noexcept
 
uint64_t ttsdk::SubscribeTimeAndSales (uint64_t instrumentId, const bool includeSimPrices, ITimeSalesEventHandlerPtr listener) noexcept
 
void ttsdk::UnsubscribeTimeAndSales (const uint64_t subscriptionId) noexcept
 
void ttsdk::StartAccount (const uint64_t accountId)
 starts orders,fills and positions for the given account.
 
bool ttsdk::ReserveRisk (InstrumentPtr instrument, const uint64_t accountId, const RiskSide side, const double quantity, const double maxClipSize) noexcept
 Reserves a quantity of risk for the given instrumentId/accountId/side to be used to by this app to avoid the quantity checks in bouncer when an order is sent. maxClipSize indicates the max lot size for orders sent. This value can not exceed any max order qty values defined in TT Setup

 
bool ttsdk::ReleaseRisk (InstrumentPtr instrument, const uint64_t accountId, const RiskSide side) noexcept
 Releases the previously allocated quantity of risk for the given instrumentId/accountId/side.
 
PositionReserveBucket ttsdk::GetRiskBucket (InstrumentPtr instrument, const uint64_t accountId) noexcept
 Returns the current position reserve bucket for the instrument and account.
 
const char *const ttsdk::GetExchAssocId () noexcept
 

Macro Definition Documentation

◆ DEPRECATE_SUPER_STRING

#define DEPRECATE_SUPER_STRING

Definition at line 21 of file tt_cplus_sdk.h.

◆ SUPER_STRING_IS_STD_STRING

#define SUPER_STRING_IS_STD_STRING

Definition at line 24 of file tt_cplus_sdk.h.