Show / Hide Table of Contents

Class TTAPIOptions

Inheritance
object
TTAPIOptions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: tt_net_sdk
Assembly: tt-net-api.dll
Syntax
public class TTAPIOptions

Constructors

TTAPIOptions(ServiceEnvironment, string, int)

Declaration
public TTAPIOptions(ServiceEnvironment environment, string appSecretKey, int timeout)
Parameters
Type Name Description
ServiceEnvironment environment
string appSecretKey
int timeout

TTAPIOptions(SDKMode, ServiceEnvironment, string, int)

Declaration
public TTAPIOptions(TTAPIOptions.SDKMode mode, ServiceEnvironment environment, string appSecretKey, int timeout)
Parameters
Type Name Description
TTAPIOptions.SDKMode mode
ServiceEnvironment environment
string appSecretKey
int timeout

Properties

AlgoUserDisconnectAction

Default value to send for the user disconnection action for algo orders. Default is Leave.

Declaration
public UserDisconnectAction AlgoUserDisconnectAction { get; set; }
Property Value
Type Description
UserDisconnectAction

AppKey

The appkey being used to authenticate the SDK and log into TT.

Declaration
public string AppKey { get; }
Property Value
Type Description
string

AppSecretKey

The appkey and secret being used to authenticate the SDK and log into TT. It looks like: 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000

Declaration
public string AppSecretKey { get; }
Property Value
Type Description
string

AutospreaderUserDisconnectAction

Default value to send for the user disconnection action for autospreader orders. Default is Cancel.

Declaration
public UserDisconnectAction AutospreaderUserDisconnectAction { get; set; }
Property Value
Type Description
UserDisconnectAction

BinaryProtocol

Advanced option which enables a more efficient method of communication with the TT servers when using Client Side mode. Default is false.

Declaration
public bool BinaryProtocol { get; set; }
Property Value
Type Description
bool

Description

Declaration
public string Description { get; }
Property Value
Type Description
string

DisplayInFlow

Whether or not to show trading quantities for energy products as the amount to be delivered in each delivery period rather than representing quantities for energy products as the entire delivery amount. Defaults to false.

Declaration
public bool DisplayInFlow { get; set; }
Property Value
Type Description
bool

EnableAccountFiltering

Advanced option to indicate the application wants to control the accounts that are subscribed to orders, fills and positions. If this is set to true, the application will need to subscribe to the desired accounts via the StartAccounts method on the TTNetAPI instance. As account's order books are downlaoded and synchronized, the application will AccountSynced events. Accounts can be subscribed to at anytime during the run of the application but they can not be unsubscribed. Default is false and all the user's accounts are subscribed.

Declaration
public bool EnableAccountFiltering { get; set; }
Property Value
Type Description
bool

EnableEstimatedPositionInQueue

Enables the use of position in queue data. Default is false.

Declaration
public bool EnableEstimatedPositionInQueue { get; set; }
Property Value
Type Description
bool

EnableEstimatedPostionInQueue

Declaration
[Obsolete("EnableEstimatedPostionInQueue will be removed in a future release. Please use EnableEstimatedPositionInQueue instead. ")]
public bool EnableEstimatedPostionInQueue { get; set; }
Property Value
Type Description
bool

EnableFillFeeds

Enables the SDK historical fill processing. If the application needs historical fills (from the start of the current session), it is recommended to enable this setting at SDK initialiation time. Default is false.

Declaration
public bool EnableFillFeeds { get; set; }
Property Value
Type Description
bool

EnableOptions

Enables the use of options price data. User needs the advanced options feature enabled in TTSetup for options data to be accessible. Default is false.

Declaration
public bool EnableOptions { get; set; }
Property Value
Type Description
bool

EnableOptionsLogging

Enables the logging of the options messages. Not recommended for production use since it could be a lot of messages in the log file depending of what/how much data is subscribed to. Default is false.

Declaration
public bool EnableOptionsLogging { get; set; }
Property Value
Type Description
bool

EnableOrderExecution

Enables the SDK order processing. If the application will be using orders, it is recommended to enable this setting at SDK initialiation time. Default is false.

Declaration
public bool EnableOrderExecution { get; set; }
Property Value
Type Description
bool

EnablePositions

Indicates whether or not to enable the positions functionality within the SDK.
Defaults to false so if position and/or PnL are required for your application, this options needs to be set to true when initializing the SDK. Please note that to calculated PnL, the SDK required price subscriptions which will count toward the total number of price subscriptions allowed by the appkey usage plan.

Declaration
public bool EnablePositions { get; set; }
Property Value
Type Description
bool

EnablePriceLogging

Enables detailed price logging so every price update received by the SDK is logged. This could output a lot of loggings so it is not recommended to use in a production environment unless an issue is being investigated. This option can be used in conjuction with PriceLoggingInstrumentId to log only a single specific instrument's updates. Default is false.

Declaration
public bool EnablePriceLogging { get; set; }
Property Value
Type Description
bool

EnableServerSideStrategyCreation

Enable to create exchange traded strategies running in server side mode. Default is false.

Declaration
public bool EnableServerSideStrategyCreation { get; set; }
Property Value
Type Description
bool

EnabledServerSideSynthetics

Enable to use synthetic orders when running in server side mode. Default is false.

Declaration
public bool EnabledServerSideSynthetics { get; set; }
Property Value
Type Description
bool

Environment

Indicates the environment in which to run the SDK.
ext_prod_live - Provides connectivity to the exchange price feeds and matching engines for live trading. ext_prod_sim - Provides access to exchange price feeds with simulated order entry. All orders are matched by our internal matching engine and never submitted to the exchange. This allows users to test out new trading strategies, provide training for traders, and API solution testing, etc. ext_uat_cert - Provides connectivity to the exchange certification environment for both prices and order matching. int-dev/stage-* - Provides access to our internal environments - only available internally.

Declaration
public ServiceEnvironment Environment { get; }
Property Value
Type Description
ServiceEnvironment

InstrumentCacheFolder

Location of the instrument cache file. Default is 'Users{user}\Documents\TradingTechnologies\Logs{application name}'

Declaration
public string InstrumentCacheFolder { get; set; }
Property Value
Type Description
string

LogDaysToKeep

Number of days to keep the log files. Must be greater than 0 and less than 365. Default is 10.

Declaration
public uint LogDaysToKeep { get; set; }
Property Value
Type Description
uint

LogDebugMessages

Enables the logger to log debug level messages. Not recommended for production use.

Declaration
public bool LogDebugMessages { get; set; }
Property Value
Type Description
bool

LogFileFolder

Location of the SDK log file. Default is 'Users{user}\Documents\TradingTechnologies\Logs{application name}'

Declaration
public string LogFileFolder { get; set; }
Property Value
Type Description
string

LogToConsole

Enables the logger to log messages to the console. Not recommended for production use.

Declaration
public bool LogToConsole { get; set; }
Property Value
Type Description
bool

LoginAttempts

Declaration
public uint LoginAttempts { get; }
Property Value
Type Description
uint

MockTradingSessionEnabled

Indicates whether to run in mock trading session mode. Valid only in client side mode. Default is false.

Declaration
public bool MockTradingSessionEnabled { get; set; }
Property Value
Type Description
bool

Mode

Indicates the mode in which to run the SDK.
Client - access from outside of the TT infrastructure through a TT Edge Server. Server - access from inside TT infrastructure via the TT network.

Declaration
public TTAPIOptions.SDKMode Mode { get; }
Property Value
Type Description
TTAPIOptions.SDKMode

OrderTimeoutSeconds

Number of seconds to wait for an order response message before timing out. Be aware changing this value could result in delayed notification of possibly lost orders. Default is 30.

Declaration
public uint OrderTimeoutSeconds { get; set; }
Property Value
Type Description
uint

PerformPriceConfigCheck

Applicable to Server Side SDK, this property will fail the SDK initialization process if the price config file is not pointing to uncoalesced price feeds. False by default so no check is performed. Enable if you NEVER want to run with coalesced prices.

Declaration
public bool PerformPriceConfigCheck { get; set; }
Property Value
Type Description
bool

PriceLoggingInstrumentId

Limits the detailed price logging to that of the single specific instrument id. EnablePriceLogging must be set to true for this option to have any affect. Default is to log all subscribed instruments when EnablePriceLogging is true.

Declaration
public ulong PriceLoggingInstrumentId { get; set; }
Property Value
Type Description
ulong

PriceWaitMs

Applicable to Server Side SDK, this property will configure the wait time wihen spinning is not enabled for prices.

Declaration
public ushort PriceWaitMs { get; set; }
Property Value
Type Description
ushort

PrimaryCurrency

Sets the primary currency used.

Declaration
public CurrencyCode PrimaryCurrency { get; set; }
Property Value
Type Description
CurrencyCode

ProcessReleasedQtyUpdates

Enables or disables the processing of Fill update messages which update the released quantity which is used for staged order allocations. If the applications does not care about this value, it can be disabled to eliminate the processing of these fll update messages. Default is true.

Declaration
public bool ProcessReleasedQtyUpdates { get; set; }
Property Value
Type Description
bool

ProfitLossCalculationType

Sets the method for PnL Calculation to use. Setting to None will allow positions to be tracked but will not subbcribe to prices so no PnL will be calculated and no price subscription taken from the total allowed by the appkey usage plan. Defaults to RiskWaterfall.

Declaration
public ProfitLossCalculationType ProfitLossCalculationType { get; set; }
Property Value
Type Description
ProfitLossCalculationType

ProxyUri

URI of the proxy to use specifically rather than the SDK querying to find it.

Declaration
public Uri ProxyUri { get; set; }
Property Value
Type Description
Uri

ResourceTimeoutInMilliseconds

The timeout value to use when making socket connections.

Declaration
public int ResourceTimeoutInMilliseconds { get; }
Property Value
Type Description
int

SDKInstanceId

Applicable to Server Side SDK, this property will configure the sdk instance id which is the unique identifier of this sdk instance. It is only needed to be set if the SDK needs to recognize andpotentially clean up orders from run to run.

Declaration
public ulong SDKInstanceId { get; set; }
Property Value
Type Description
ulong

ServerInstanceId

Declaration
[Obsolete("ServerInstanceId no longer needs to be specified.", false)]
public string ServerInstanceId { get; set; }
Property Value
Type Description
string

ServerPriceDelivery

Indicates whether to change the price delivery model when running in Server Side mode. Normal - price events are called on the price subscription dispatcher thread. Through - price events (market data and time and sales) are called directly on the sdk price thread. Direct - market data price events are called directly on the sdk price thread and the SDK does NOT maintain a price book. If secondary subscriptions are made, the onus is on the user to provide the book or to wait for the next market update

Declaration
public TTAPIOptions.PriceDelivery ServerPriceDelivery { get; set; }
Property Value
Type Description
TTAPIOptions.PriceDelivery

ServerPriceThreads

Applicable to Server Side SDK, this property will configure the number of threads on which to process price updates.

Declaration
public byte ServerPriceThreads { get; set; }
Property Value
Type Description
byte

SpinPriceThread

Applicable to Server Side SDK, this property will configure the price receiving thread to spin. Set to true for the best price performance. If serveral SDK apps will be running simultaneously and you do not want to consume a core for each app, set to false. Default is true.

Declaration
public bool SpinPriceThread { get; set; }
Property Value
Type Description
bool

SpinPriceThreadCore

Applicable to Server Side SDK, this property will configure the core on which the price receiving will spin if spinning is enabled. Set to -1 is not spinning. Default is 1.

Declaration
public int SpinPriceThreadCore { get; set; }
Property Value
Type Description
int

UseClassicPrices

Whether or not rto use "classic price format" global preference where CME prices are displayed without decimal points. Defaults to false.

Declaration
public bool UseClassicPrices { get; set; }
Property Value
Type Description
bool

UseDecimalPrices

Whether or not to show fractional prices/ticks as decimals for instruments with fractional ticking and apostrophe price display Defaults to false.

Declaration
public bool UseDecimalPrices { get; set; }
Property Value
Type Description
bool

UseIndicativeSettleForPnL

Sets whether to use indicative settlement prices instead of settlement prices when calculating PnL If the indicative settlement price is not available, the calculation will use the settlement price. Defaults to false.

Declaration
public bool UseIndicativeSettleForPnL { get; set; }
Property Value
Type Description
bool

Methods

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
In this article
Back to top