Cleaning up
When you shut down your application, you should detach all event handlers and call the Dispose method for each instance of the TradeSubscription and FillsSubscription classes. For example:
This section provides information for subscribing for order and fill updates.
When you shut down your application, you should detach all event handlers and call the Dispose method for each instance of the TradeSubscription and FillsSubscription classes. For example:
Creating EPIQ subscriptions TT .NET SDK supports delivering Position-in-Queue (PIQ) for each of you orders. To create a PIQ subscription and start receiving updates: Subscribing for EPIQ Typically, you start an EPIQ subscription immediately after initializing the API. The following snippet demonstrates how to instantiate an EstimatedPositionInQueueSubscription instance: Note: When you have a shared order book or if you […]
To modify an existing order, you create a new OrderProfileBase object based on the existing Order by calling the GetOrderProfile() method from the Order object. The new Order profile object contains the same property values as the existing Order. You can modify any properties of the Order profile object. After making the desired changes, set the value of the OrderProfile.Action property to indicate how the existing order should be modified, […]
A trade subscription represents a view of a subset of a trader’s orders and fills. You can create more than one trade subscription in your TT .NET SDK application where each may have a view of a different subset of orders and fills. From within a trade subscription, you can subscribe for order status events […]
TT .NET SDK allows you to obtain a snapshot of your positions and P&L at any point after the API has successfully synchronized the order books by calling either the TTAPI.GetPositionSnapshot() or TTAPI.GetPositionSnapshots() methods. The former will return a single Position object for the AccountKey and InstrumentKey that are provided. The latter returns a collection of Position objects for all unique AccountKey / […]
To send a new order to an Exchange, you must first create an OrderProfile object, using one of its constructors, like the following: After populating the OrderProfile properties with the appropriate settings that describe the order, you submit it to an exchange by calling the SendOrder() method from a TradeSubscription object. After TT .NET SDK sends the order, it creates an Order object that represents […]
TT .NET SDK offers two methods to receive fills. Supported update events A FillsSubscription object fires the following events. If fills have not yet occurred, a FillListStart event will be received followed by a FillListEnd event. A FillBookDownload does not fire if there are no fills. Subscribing for update events You can subscribe for update events as follows before calling the FillsSubscription.Start() method. The following […]