Class TTAPI
Assembly: tt-net-api.dll
Syntax
public class TTAPI : UserEventHandler
Properties
Accounts
Declaration
public IReadOnlyCollection<Account> Accounts { get; }
Property Value
ApplicationId
Declaration
public string ApplicationId { get; }
Property Value
CurrentUser
Declaration
public SDKUser CurrentUser { get; }
Property Value
DefaultAccount
Declaration
public Account DefaultAccount { get; }
Property Value
IsLiveProduction
Declaration
public static bool IsLiveProduction { get; }
Property Value
IsSimulation
Declaration
public static bool IsSimulation { get; }
Property Value
MarketCatalog
Declaration
public MarketCatalog MarketCatalog { get; }
Property Value
Options
Declaration
public TTAPIOptions Options { get; }
Property Value
OrderTagDefaults
Declaration
public IReadOnlyCollection<OrderTagDefaults> OrderTagDefaults { get; }
Property Value
UserName
Declaration
public string UserName { get; }
Property Value
Methods
CreateTTAPI(Dispatcher, TTAPIOptions, ApiInitializeHandler, ProxyCredentialsHandler)
Declaration
public static void CreateTTAPI(Dispatcher disp, TTAPIOptions configuration, ApiInitializeHandler handler, ProxyCredentialsHandler proxyHandler = null)
Parameters
GetAccountByName(string)
Declaration
public Account GetAccountByName(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetAppKeyType(out string)
Declaration
public AppKeyType GetAppKeyType(out string msg)
Parameters
Type |
Name |
Description |
string |
msg |
|
Returns
GetOrderTagDefaultsByName(string)
Declaration
public OrderTagDefaults GetOrderTagDefaultsByName(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetPositionSnapshot(AccountKey, InstrumentKey)
Declaration
public Position GetPositionSnapshot(AccountKey acct, InstrumentKey key)
Parameters
Returns
GetPositionSnapshots()
Declaration
public IList<Position> GetPositionSnapshots()
Returns
GetUserName(ulong)
Declaration
public string GetUserName(ulong userId)
Parameters
Type |
Name |
Description |
ulong |
userId |
|
Returns
Shutdown()
Declaration
public static bool Shutdown()
Returns
Type |
Description |
bool |
void
|
Start()
Declaration
Exceptions
Type |
Condition |
Exception |
Thrown when an exception error condition occurs.
|
StartFillFeed()
Declaration
public void StartFillFeed()
StartOrderFeed()
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
Returns
Events
AccountDown
Declaration
public event EventHandler<AccountSyncedEventArgs> AccountDown
Event Type
AccountSynced
Declaration
public event EventHandler<AccountSyncedEventArgs> AccountSynced
Event Type
AdminMessage
Declaration
public event EventHandler<AdminMessageEventArgs> AdminMessage
Event Type
AfterSendOrder
Declaration
public event EventHandler<AfterSendOrderEventArgs> AfterSendOrder
Event Type
BeforeSendOrder
Declaration
public event EventHandler<BeforeSendOrderEventArgs> BeforeSendOrder
Event Type
CurrencyUpdated
Declaration
public event EventHandler<CurrencyUpdatedEventArgs> CurrencyUpdated
Event Type
HistoricalFillDownloadComplete
Declaration
public event EventHandler HistoricalFillDownloadComplete
Event Type
OrderbookSynced
Declaration
public event EventHandler OrderbookSynced
Event Type
ProfitLossChanged
Declaration
public event EventHandler<ProfitLossChangedEventArgs> ProfitLossChanged
Event Type
RiskAccountsChanged
Declaration
public event EventHandler RiskAccountsChanged
Event Type
ShutdownCompleted
Declaration
public static event EventHandler ShutdownCompleted
Event Type
TTAPIOptionsStatus
Declaration
public event EventHandler<TTAPIOptionsStatusEventArgs> TTAPIOptionsStatus
Event Type
TTAPIStatusUpdate
Declaration
public event EventHandler<TTAPIStatusUpdateEventArgs> TTAPIStatusUpdate
Event Type
TTApiError
Declaration
public event EventHandler<ErrorEventArgs> TTApiError
Event Type
TradingEnabledChanged
Declaration
public event EventHandler<MarketStatusEventArgs> TradingEnabledChanged
Event Type
UnhandledManagedException
Declaration
public event EventHandler<UnhandledManagedExceptionEventArgs> UnhandledManagedException
Event Type