Show / Hide Table of Contents

Class TTAPI

A tt net api.

Inheritance
object
UserEventHandler
TTAPI
Inherited Members
object.ToString()
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 TTAPI : UserEventHandler

Properties

Accounts

Declaration
public IReadOnlyCollection<Account> Accounts { get; }
Property Value
Type Description
IReadOnlyCollection<Account>

ApplicationId

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

CurrentUser

Declaration
public SDKUser CurrentUser { get; }
Property Value
Type Description
SDKUser

DefaultAccount

Declaration
public Account DefaultAccount { get; }
Property Value
Type Description
Account

IsLiveProduction

Declaration
public static bool IsLiveProduction { get; }
Property Value
Type Description
bool

IsSimulation

Declaration
public static bool IsSimulation { get; }
Property Value
Type Description
bool

MarketCatalog

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

Options

Declaration
public TTAPIOptions Options { get; }
Property Value
Type Description
TTAPIOptions

OrderTagDefaults

Declaration
public IReadOnlyCollection<OrderTagDefaults> OrderTagDefaults { get; }
Property Value
Type Description
IReadOnlyCollection<OrderTagDefaults>

UserName

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

Methods

CreateTTAPI(Dispatcher, TTAPIOptions, ApiInitializeHandler, ProxyCredentialsHandler)

Declaration
public static void CreateTTAPI(Dispatcher disp, TTAPIOptions configuration, ApiInitializeHandler handler, ProxyCredentialsHandler proxyHandler = null)
Parameters
Type Name Description
Dispatcher disp
TTAPIOptions configuration
ApiInitializeHandler handler
ProxyCredentialsHandler proxyHandler

GetAccountByName(string)

Declaration
public Account GetAccountByName(string name)
Parameters
Type Name Description
string name
Returns
Type Description
Account

GetAppKeyType(out string)

Declaration
public AppKeyType GetAppKeyType(out string msg)
Parameters
Type Name Description
string msg
Returns
Type Description
AppKeyType

GetOrderTagDefaultsByName(string)

Declaration
public OrderTagDefaults GetOrderTagDefaultsByName(string name)
Parameters
Type Name Description
string name
Returns
Type Description
OrderTagDefaults

GetPositionSnapshot(AccountKey, InstrumentKey)

Declaration
public Position GetPositionSnapshot(AccountKey acct, InstrumentKey key)
Parameters
Type Name Description
AccountKey acct
InstrumentKey key
Returns
Type Description
Position

GetPositionSnapshots()

Declaration
public IList<Position> GetPositionSnapshots()
Returns
Type Description
IList<Position>

GetUserName(ulong)

Declaration
public string GetUserName(ulong userId)
Parameters
Type Name Description
ulong userId
Returns
Type Description
string

Shutdown()

Shuts down the API

Declaration
public static bool Shutdown()
Returns
Type Description
bool

void

Start()

Starts this object.

Declaration
public void Start()
Exceptions
Type Condition
Exception

Thrown when an exception error condition occurs.

StartFillFeed()

Starts fill feed.

Declaration
public void StartFillFeed()

StartOrderFeed()

Starts order feed.

Declaration
public void StartOrderFeed()

SubscribeAccounts(List<Account>)

Subscribes for orders/fills/positions to the list of provided accounts.

Declaration
public bool SubscribeAccounts(List<Account> accountToSubscribe)
Parameters
Type Name Description
List<Account> accountToSubscribe
Returns
Type Description
bool

Events

AccountDown

Declaration
public event EventHandler<AccountSyncedEventArgs> AccountDown
Event Type
Type Description
EventHandler<AccountSyncedEventArgs>

AccountSynced

Declaration
public event EventHandler<AccountSyncedEventArgs> AccountSynced
Event Type
Type Description
EventHandler<AccountSyncedEventArgs>

AdminMessage

Declaration
public event EventHandler<AdminMessageEventArgs> AdminMessage
Event Type
Type Description
EventHandler<AdminMessageEventArgs>

AfterSendOrder

Declaration
public event EventHandler<AfterSendOrderEventArgs> AfterSendOrder
Event Type
Type Description
EventHandler<AfterSendOrderEventArgs>

BeforeSendOrder

Declaration
public event EventHandler<BeforeSendOrderEventArgs> BeforeSendOrder
Event Type
Type Description
EventHandler<BeforeSendOrderEventArgs>

CurrencyUpdated

Declaration
public event EventHandler<CurrencyUpdatedEventArgs> CurrencyUpdated
Event Type
Type Description
EventHandler<CurrencyUpdatedEventArgs>

HistoricalFillDownloadComplete

Declaration
public event EventHandler HistoricalFillDownloadComplete
Event Type
Type Description
EventHandler

OrderbookSynced

Declaration
public event EventHandler OrderbookSynced
Event Type
Type Description
EventHandler

ProfitLossChanged

Declaration
public event EventHandler<ProfitLossChangedEventArgs> ProfitLossChanged
Event Type
Type Description
EventHandler<ProfitLossChangedEventArgs>

RiskAccountsChanged

Declaration
public event EventHandler RiskAccountsChanged
Event Type
Type Description
EventHandler

ShutdownCompleted

Declaration
public static event EventHandler ShutdownCompleted
Event Type
Type Description
EventHandler

TTAPIOptionsStatus

Declaration
public event EventHandler<TTAPIOptionsStatusEventArgs> TTAPIOptionsStatus
Event Type
Type Description
EventHandler<TTAPIOptionsStatusEventArgs>

TTAPIStatusUpdate

Declaration
public event EventHandler<TTAPIStatusUpdateEventArgs> TTAPIStatusUpdate
Event Type
Type Description
EventHandler<TTAPIStatusUpdateEventArgs>

TTApiError

Declaration
public event EventHandler<ErrorEventArgs> TTApiError
Event Type
Type Description
EventHandler<ErrorEventArgs>

TradingEnabledChanged

Declaration
public event EventHandler<MarketStatusEventArgs> TradingEnabledChanged
Event Type
Type Description
EventHandler<MarketStatusEventArgs>

UnhandledManagedException

Declaration
public event EventHandler<UnhandledManagedExceptionEventArgs> UnhandledManagedException
Event Type
Type Description
EventHandler<UnhandledManagedExceptionEventArgs>
In this article
Back to top