Show / Hide Table of Contents

Class TradeSubscription

Inheritance
object
UserEventHandler
Subscription
TradeSubscription
AlgoTradeSubscription
InstrumentTradeSubscription
Implements
IDisposable
Inherited Members
Subscription.Tag
Subscription.Dispatcher
Subscription.Dispose()
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 TradeSubscription : Subscription, IDisposable

Constructors

TradeSubscription(Dispatcher)

Declaration
public TradeSubscription(Dispatcher dispatcher)
Parameters
Type Name Description
Dispatcher dispatcher

TradeSubscription(Dispatcher, bool)

Declaration
public TradeSubscription(Dispatcher dispatcher, bool ownOrdersOnly)
Parameters
Type Name Description
Dispatcher dispatcher
bool ownOrdersOnly

Properties

BuyWorking

Declaration
public decimal BuyWorking { get; }
Property Value
Type Description
decimal

Fills

Declaration
public IDictionary<string, Fill> Fills { get; }
Property Value
Type Description
IDictionary<string, Fill>

Filter

Declaration
public TradeSubscriptionFilter Filter { get; }
Property Value
Type Description
TradeSubscriptionFilter

Orders

Declaration
public IDictionary<string, Order> Orders { get; }
Property Value
Type Description
IDictionary<string, Order>

OwnOrdersOnly

Declaration
public bool OwnOrdersOnly { get; }
Property Value
Type Description
bool

PositionStatistics

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

SellWorking

Declaration
public decimal SellWorking { get; }
Property Value
Type Description
decimal

Methods

CancelOrderViaREST(OrderProfile)

This method provides an alternative mechanism to cancel orders which can be used when the TTSDK is disconnected from the system. Using the method the application can cancel the working orders via a REST ASI call. If successfully cancelled, a OrderDeleted event will be triggered. If not, a OrderRejected event will be triggered. Note: This is a synchronous call and only one order at a time is supported. If the reason the SDK is discionnected is network/internet related, this request can fail so code accordingly.

Declaration
public virtual bool CancelOrderViaREST(OrderProfile orderProfile)
Parameters
Type Name Description
OrderProfile orderProfile
Returns
Type Description
bool

ClearFilter()

Declaration
public bool ClearFilter()
Returns
Type Description
bool

DeleteAll()

Declaration
public bool DeleteAll()
Returns
Type Description
bool

DeleteBySide(BuySell)

Declaration
public bool DeleteBySide(BuySell buySell)
Parameters
Type Name Description
BuySell buySell
Returns
Type Description
bool

GetLogString()

Declaration
public string GetLogString()
Returns
Type Description
string

PublishManualFill(FillProfile, out string)

Declaration
public bool PublishManualFill(FillProfile fillProfile, out string response)
Parameters
Type Name Description
FillProfile fillProfile
string response
Returns
Type Description
bool

SendOrder(IEnumerable<OrderProfile>)

Declaration
public virtual bool SendOrder(IEnumerable<OrderProfile> profiles)
Parameters
Type Name Description
IEnumerable<OrderProfile> profiles
Returns
Type Description
bool

SendOrder(OrderProfile)

Declaration
public virtual bool SendOrder(OrderProfile orderProfile)
Parameters
Type Name Description
OrderProfile orderProfile
Returns
Type Description
bool

SendRFQ(Instrument, Account)

Declaration
public bool SendRFQ(Instrument instrument, Account account)
Parameters
Type Name Description
Instrument instrument
Account account
Returns
Type Description
bool

SetFilter(TradeSubscriptionFilter)

Declaration
public bool SetFilter(TradeSubscriptionFilter filter)
Parameters
Type Name Description
TradeSubscriptionFilter filter
Returns
Type Description
bool

Start()

Declaration
public override void Start()
Overrides
Subscription.Start()

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Events

OrderAdded

Declaration
public event EventHandler<OrderAddedEventArgs> OrderAdded
Event Type
Type Description
EventHandler<OrderAddedEventArgs>

OrderBookDownload

Declaration
public event EventHandler<OrderBookDownloadEventArgs> OrderBookDownload
Event Type
Type Description
EventHandler<OrderBookDownloadEventArgs>

OrderDeleted

Declaration
public event EventHandler<OrderDeletedEventArgs> OrderDeleted
Event Type
Type Description
EventHandler<OrderDeletedEventArgs>

OrderFilled

Declaration
public event EventHandler<OrderFilledEventArgs> OrderFilled
Event Type
Type Description
EventHandler<OrderFilledEventArgs>

OrderPendingAction

Declaration
public event EventHandler<OrderPendingActionEventArgs> OrderPendingAction
Event Type
Type Description
EventHandler<OrderPendingActionEventArgs>

OrderRejected

Declaration
public event EventHandler<OrderRejectedEventArgs> OrderRejected
Event Type
Type Description
EventHandler<OrderRejectedEventArgs>

OrderStatusUnknown

Declaration
public event EventHandler<OrderStatusUnknownEventArgs> OrderStatusUnknown
Event Type
Type Description
EventHandler<OrderStatusUnknownEventArgs>

OrderTimeout

Declaration
public event EventHandler<OrderTimeoutEventArgs> OrderTimeout
Event Type
Type Description
EventHandler<OrderTimeoutEventArgs>

OrderUpdated

Declaration
public event EventHandler<OrderUpdatedEventArgs> OrderUpdated
Event Type
Type Description
EventHandler<OrderUpdatedEventArgs>

QuoteResponse

Declaration
public event EventHandler<QuoteResponseEventArgs> QuoteResponse
Event Type
Type Description
EventHandler<QuoteResponseEventArgs>

Implements

IDisposable
In this article
Back to top