Frequently Asked Questions
General
What programming language can I use with the .NET SDK?
The .NET SDK is built on the Microsoft .NET technology so it can be used with any language that can work with .NET such as, but not limited to, C#, F#, Python and C++. The SDK has support for multiple .NET frameworks so users can choose the framework that works for their needs. For simplicity and ease of use, TT recommends using Microsoft Visual Studio and C#.
I would like to use Python to communicate with TT, not ironpython under .Net Framework. The documentation states that "to use TT you must use Visual Studio 2017 and higher". Is it possible to not build all the coding in Visual Studio but just using Python IDLE?
Users can use whatever language and development tools they want provided the language works with Microsoft .Net. TT recommends C# and Visual Studio 2017 or higher because it is easiest but any other language and IDE can be used. TT does not provide assistance with setting up and configuring development tools and environments
Does TT only support .NET 4.6.1 or .NET 5?
The SDK versions are compatible with newer versions of .NET. So an application can use NET 8 with the NET 5 version of the SDK. Please note the NET5 version will not run server side. If you need to run on server mode, you should use a 4x framework version with the 4.6 SDK.
Does TT provide any samples written in Python?
TT provides a Python sample in the samples repo.
Does the .NET SDK work with Linux?
Yes the SDK NET5 version will natively run on Linux because .NET is a cross-platform, open-source developer platform for building many different types.
The 4.x NET framework will not officially run on Linux but it can work with a tool like Mono. Please refer to the internet to find more information about configuring this for your purposes.
Note: TT does not technically support running on platforms other than Windows because TT does not do any testing of the SDK on other platforms. TT does not provide information on how to setup, configure or run TT .NET on other platforms.
Is it possible to pull chart study output using API?
No. The SDKs do not provide chart algorithms, calculated chart data or any historical price data.
Does the .NET SDK provide Credit Utilization data like the REST API does?
No, neither the .NET or CORE SDKs provide Credit Utilization data.
Throttle Limits
Is there a limit to how many price subscriptions can be made?
TT does not have a limit or throttle between starting subscriptions. However, sending of price subscriptions request messages is throttled at a rate of 750 requests per second. When/if the number of price subscriptions exceeds 15000 and 30000, the throttle rate decreases and slows the submission of price subscriptions.
Are there throttle limits for instrument lookups?
TT does not have a limit between starting subscriptions. There is a limit on the number of instrument lookups that can be done within a second. Currently this limit is 5 but is subject to change at any time. If the limit is exceeded, TT will throttle the request.
Are there limits on placing RFQs?
Yes, the application is limited to a default of 50 requests per second. Please note throttle values can be changed by TT at any time.
Are there throttles on downloading fills using FillDownload?
Yes, the application is limited to a default of 1 request per 10 seconds. Please note throttle values can be changed by TT at any time. If the request is throttled, the response will be FillDownloadResult.ThrottleExceeded and the application should wait and then retry.
Timestamps
Are timestamps in the TT .NET SDK limited to milliseconds or can they be set to show microseconds?
Timestamps in the TT .NET SDK are typically DateTime objects so they can contain milliseconds (and ticks).
The timestamps in TimeAndSalesData are in my local workstation time - is that because the same kind of conversion happens in .NET directly as if I was looking in the TT desktop application?
Yes, DateTime fields in the SDK are in user local time.
ExchangeRecvTime, ClientRecvTime and ServerRecvTime in the PriceSubscriptionField update event are represented as unsigned longs. Are they in UTC?
Yes.
Is there functionality in the .NET SDK that can convert local or UTC time to a specific exchange (e.g. CME)?
No, TT .NET SDK does not provide the conversion or an offset for the conversion to convert to exchange local time.
Logging
I see a date and time on the log messages in the SDK log file. Is that my local time?
No, the time values in the SDK log file are in UTC.
Is there an SDK log file?
Yes, TT .NET SDK creates a log file for each process and it is located by default in the '\Users\
Can my application write to the SDK log file?
Yes. See Logging.
Can I change the location of where the SDK log files are stored?
Yes. Set the TTAPIOption.LogFileFolder to the folder you want to use.
Note: The folder must exist.
Why doesn’t the TTW transaction time match the time the Fill Execution Report is logged in the SDK log?
The SDK logs after the processing of the fill to avoid logging (an expensive operation) during the critical path so the timestamp is after the fill is processed not when the fill is received.
What does the log file look like? How do I know if this is the SDK log file?
The SDK log file follows the standard TT logging format with several columns, including the date/time, thread id, component, log level, and the message.
Example:
2025-01-23 13:20:35.3277909 | 0000015 | | INFO | ### APPLICATION RESTART ###
2025-01-23 13:20:35.3281247 | 0000015 | | INFO | --- S T A R T U P T T N E T S D K ---
2025-01-23 13:20:35.3286552 | 0000015 | | INFO | SDK Version: 3.4.1.1
2025-01-23 13:20:35.3293887 | 0000015 | Dspch | INFO | WorkerDispatcher thread starting.
2025-01-23 13:20:35.3332709 | 0000015 | TTAPI | INFO | OS Platform: Unix Version Major:5 Minor:10 [8]
2025-01-23 13:20:35.3333428 | 0000015 | TTAPI | INFO | Framework: .NET 8.0.12
2025-01-23 13:20:35.3349326 | 0000015 | TTAPI | INFO | Options received - Environment:ProdLive
Market Data
What types of market data are available via the TT .NET SDK?
The SDK provides real-time market data. Users can subscribe to Trade Date [High, Low, Open, Close…], Inside Market, Market Depth or Detailed Depth. Enum PriceSubscriptionType
Note: Detailed depth is not supported when running in Server mode.
Is “Detailed Depth” available. Is this the same as the Market By Order (“MBO”) order-based data feed offered by CME (and other exchanges)?
Detailed Depth data is only available on those exchanges that publish it. For CME, Detailed Depth is the data on the Market By Order (“MBO”) feed. Detailed Depth is currently only available via the TT .NET SDK. TT CORE SDK does not deliver detailed depth.
Are exchange-based Order IDs available for all orders in the market?
The TT .NET SDK does not provide the exchange-based order IDs for orders belonging to other market participants. The TT CORE SDK does provide the exchange sequence numbers.
Are exchange-based sequence numbers available?
The TT .NET SDK does not provide exchange-based sequence numbers. This is especially true for client-side applications because prices are coalesced.
Is the Indicative Opening Price (“IOP”) available?
Indicative Open is available as the IndicatePrice and IndicateQuantity fields in the PriceSubscriptionFields object.
Are Daily Limit Prices available via the TT .NET SDK?
Daily Limit Prices are not available.
I am having trouble getting positions.
To properly receive and track positions, you must also set the TTAPIOptions.EnablePositions property to true for the TTAPI.GetPositionSnapshot() or TTAPI.GetPositionSnapshots() methods to work.
What types of market data are available via the TT .NET SDK?
The SDK provides real-time market data. Users can subscribe to Trade Date [High, Low, Open, Close…], Inside Market, Market Depth or Detailed Depth.
Note: Detailed depth is not supported when running in server mode.
Are historical prices available via the TT .NET SDK?
No, the SDK does not provide any historical price data.
How do I get chart data such as 1-minute candlesticks via the TT .NET SDK?
The SDK does not provide any chart data. User applications would have to subscribe to the real-time price stream and calculate the candlesticks for it to consume.
Is there a way to know how many subscription requests were handled when the PriceSubscription request returns "SubscriptionLimitExceeded" ?
The SDK does not log the number of subscriptions because the TT Edge server tracks this data, not the SDK. The plan will be exceeded when the count is 1 more than the number allowed by the key's usage plan. See Authenticating a TT .NET SDK application.
Note All price subscriptions count, so if the user has enabled PnL in the SDK and there are positions, the SDK will subscribe to those contracts and those subs will count towards the limit (unless the user set the PnL calculation type to None when starting the SDK).
Is the Open Interest available?
The SDKs do expose the Open Interest Field on the PriceSubscription. You can use the GetOpenInterestField() to get the value.
Does the SDK provide Volume?
Contract volume is available via the PriceSubscription.GetTotalTradedQuantityField() method.
What price fields does the SDK provide?
See Enum FieldId for a list of field available via the PriceSubscription fields.
I receive an Implied Price only if the implied price is the best. Is there any reason the other implied levels are not sent?
The TT platform only provides the first level of implied depth and only merges it if it is the best price.
Which field in the PriceSubscription allows us to determine whether it’s a limit order or an implied?
There are multiple fields: best, direct and implied fields. These values are accessible from the PriceSubscriptionFields GetBest<Bid/Ask>PriceField(), GetDirect<Bid/Ask>PriceField() and GetImplied<Bid/Ask>PriceField()
Do T&S subs count towards the price subscription limit for SDK?
Yes. Please note the count is by contract so T&S and MD for the same contract is 1. If they are for different contracts, it is 2.
Is the usage key a hard-limit which I cannot exceed? What happens if I try to subscribe to more than the allowed number of instruments?
The new subscription requests will fail SubscriptionStatus.SubscriptionLimitExceeded. A message will also be logging in the SDK log file:
PrcSub | WARN | PS85_GCV4_8007146139239074196 failed. Status:SubscriptionLimitExceeded Exceeded appkey price subscription limit. Consider an appkey with higher usage plan.
Does TT provide samples of real-time market data subscriptions, so I can get a feel for what the data would look like?
Sample code is located in our sample repo. TT does not have sample output, but you can get a UAT account for free to get an idea of what it looks like. SDK provides the same data as one would see in the TTW Market Grid.
What options data is available via which subscription object?
The OptionsChainSubscription is intended to match the TTW Options Chain widget. This subscription will not have ALL the possible greek data. To see that data (which corresponds to the TTW Market Grid widget), please use a PriceSubscription and include the greeks when setting the PriceSubscriptionSettings for the instrument. PriceSubscription with IncludeGreek=true matches TTW MarketGrid. ChainSubscription matches TTW Options Chain widget.
Does the SDK support Product Level subscription in a TimeAndSalesSubscription?
No, Time and Sales is by instrument only at this time.
How do I configure market data sessions for my appkey?
Click Allow to enable a market data group and configure the Sessions field as follows:
- If using only TT .NET SDK Client Side application keys, then set Sessions equal to the number of application keys you plan to run concurrently.
- If using only TT .NET SDK Client Side - Non-display application keys, then set Sessions equal to "0" and check the Non-display checkbox, which indicates the market data is for non-display purposes (e.g., black-box algorithm, automated program for calculating P/L, etc.) as defined by the exchange.
- If using both TT .NET SDK Client Side and TT .NET SDK Client Side - Non-display application keys, then set Sessions equal to the number of TT .NET SDK Client Side application keys that you plan to run concurrently and check the Non-display checkbox.
Orders
Are exchange-based Order IDs available for all orders in the market?
The TT .NET SDK does not provide the exchange-based order IDs for orders belonging to other market participants. The TT CORE SDK does provide the exchange sequence numbers.
I want to bulk send orders with the same instrument and price (or multiple prices as well). Is there any functionality in the SDK which will help in sending multiple orders at once?
The TradeSubscription can send one order profile or multiple orders profiles. A unique OrderProfile will need to be created for each order that is to be sent.
I would like to mimic the Cancel Buy/Cancel Sell orders feature in the MD Trader widget via TT.NET SDK. Is there a sample or any documentation on how to achieve this?
Please look at the TradeSubscription object where you will find DeleteAll and DeleteBySide methods.
Are Care Orders supported by the .NET SDK?
The .NET SDK provides basic Care Order support. Please see ../articles/ac-staged-orders.html for more details.
Is it possible to stage orders (TT OMS) via the .NET SDK?
Yes, please see Managing Staged Orders for more details.
Can I submit orders to stay "on hold" before "working".
Yes. Set IsOnHold on the order profile before sending the order.
How can I specify individual accounts for each leg of an Autospreader order?
Using the leg_SetLegAccount method on the OrderProfile.
How can an order be canceled?
To delete an existing order, set the OrderProfile Action to OrderAction.Delete.
If I send an Orderprofile with OrderAction.Change to my trade subscription and the function returns True, can I then assume that the change went through or do I need to wait for the OrderUpdated or OrderRejected event from the TradeSubscription to know?
The true return code from the method indicates the change request message was successfully sent from the SDK. It does not indicate it was received or processed. To know if the order was successfully changed, the application needs to wait for the OrderUpdated event to be called to know the order was successfully changed. If the processing was not successful, the OrderRejected or OrderTimeout event would be triggered.
Which event on the TT .NET SDK Trade Subscription Class would it be sent to so I can capture a limit breach correctly in my application?
A rejection will come through the OrderRejected event. Details regarding the rejection can be determined by checking the CancelRejectReason and the Message on the rejected order.
Is it possible for TT.NET SDK to update the sender location or an order via the API?
No, the sender location is set by the user data as configured in TT Setup. To change the value used, one must change the value in the TT Setup GUI and it cannot be overridden on an order by order basis via the SDK.
Can the SDK take advantage of using profiles within order tag defaults?
Yes, the SDK allows the application to select the defaults to use on the order using the OrdertagDefaults property on the OrderProfile.
Does the SDk support overriding the clearing account on an order?
Yes, please see the ClearingAccountOverride property on the OrderProfile.
Are Position Reserve Orders supported by .NET SDK?
No, PR orders are not supported by TT .NET SDK. Only TT Core SDK supports PR.
I am continually receiving Order Reject messages (OrderRejectReason.RoutingError). What could be the cause?
Accounts must be synced before routing an order.
This can occur if you set EnableAccountFiltering in the options to true but do not call SubscribeAccounts. Basically, the results in your accounts not properly syncing and therefore not available to trade.
If this occurs, your logs will contain Missing account subscription messages on the rejected orders along with the OrderRejectReason.RoutingError. Accounts must be synced before routing an order. Typically, this point in time is known to the user via the OrderbookDownload event but when you used the advanced EnableAccountFiltering, it is when each account is synced which triggers AccountSynced.
So either set EnableAccountFiltering = false or call SubscribeAccounts for the accounts you choose to use and wait for the AccountSynced event before sending orders on that account.
When using EnableAccountFiltering, please also make certain EnableOrderExecution is set to true when the SDK is initialized.
Refer to the Account Filtering section for more information.
Sending an Order Request on a Filled Order
An error may occur if you send an order request for an order that is fully filled.
The TT .NET SDK does not validate orders when the application sends a message. If your application sends an order request, the SDK sends the request and allows the system to determine validity.
I would like to check if I set the CME tag 50 properly. How can I set or see my order’s CME tag 50 setting?
Tag 50 default value is configured in TTSetup. It is called SubUserid in the SDK. It can be set in the SDK using the SubUserId property on the OrderProfile. It can be retrieved from the Order as well.
I was under the impression that only Algo orders were considered automated, but just wanted confirmation whether orders via TT. NET SDK API also causes them to be "automated" on CME.
By default, the SDK orders are set to be automated. Users can change this by setting the IsAutomated property on the OrderProfile.
Fills
Can I retrieve fill data between two timestamps?
The TT .NET SDK only supports real-time fill data. You could use the .NET SDK FillSubscription class and receive fills in real-time starting with the current session.
Users can retrieve fills between any two timestamps manually using the FillDownload class in the .NET SDK.
I’m downloading historical fills but don’t see all of them. Why not?
The orders to which you're referencing are over 90 days old. In the system, the backend component retains data for up to 90 days. To access data older than 90 days, your application would need to use the TTLedgerAPI endpoints in the live production environment.
For the UAT environment, however, data is retained for only 15 days. Unfortunately, this means it is not possible to retrieve older orders in the UAT environment.
The TTLedgerAPI endpoint can access data older than 90 days in production. Can I see the individual fills that make up a fill from Eurex?
There is a fill group property on the Fill in the SDK. Please see the online documentation for further details.
Is it possible to delete a manual Fill?
There is no mechanism in the SDK to delete a manual fill.
Positions
Can I pull positions from the TT.NET SDK
I am having trouble getting positions.
To properly receive and track positions, you must also set the TTAPIOptions.EnablePositions property to true for the TTAPI.GetPositionSnapshot() or TTAPI.GetPositionSnapshots() methods to work.
Once the orderbook is synced, I am getting a position snapshot for the accounts mapped under the parent account. After that I am subscribing to fill updates to maintain positions real-time. I was randomly checking the log file that TT maintains and was getting pending updates for price subscription even though I haven't subscribed to the pricing updates in my code. Why are price subscriptions being made while TTAPI is syncing orderbook that my application is not requesting?
The application likely has EnablePositions set to true and the ProfitLossCalculationType defaulted to RiskWaterfall. In this case, the SDK need prices in order to calculate the requested PnL. If the application does not need PnL calculation part of the position tracking, you can set the profit loss calculation type to None.
Do subscriptions made by the SDK for PnL calculations count toward my key’s total usage allowed?
Yes, every price subscription made (either by the application or the SDK) counts to the total amount allowed by the user’s key.
Do subscriptions made by the SDK for PnL calculations count toward my user’s sessions allowed?
Yes, if the SDK makes a price subscription for any reason, it will consume one of the user’s allotted market data sessions.
I noticed that when an exchange-listed spread or an ASE gets filled, these spreads and their legs are represented within the Positions widget on the TT Desktop UI. However, when calling TTAPI.GetPositionSnapshots() via the TT .NET SDK, I can only see positions for a filled exchange-listed spread and its legs. For a filled ASE spread, I can only see the positions of the legs, but not the spread itself.
TT .NET SDK does not calculate PnL or positions for synthetic instruments.
Algo
I have an ADL that has alert blocks that write to the audit trail. I would like to be able to get the alerts from the TT .NET SDK. Is this possible?
Yes, by using the AlgoTradeSubscription and hooking up an event handler to the AlertsFired event.
I would like to use the TT .NET SDK to submit orders for third-party algos. How do I do this?
Third-party (or bank algos) are treated like any other algo and orders are placed for them the same way as other algos in TT. See Launching an algo for more details.
Can ADL algo orders be sent using simply a TradeSubscription or does it need an AlgoTradeSubscription?
Yes, a TradeSubscription can send and receive any order that passes its filter. AlgoTradeSubscription adds a filter on the algo and also provides additional events for algo orders.
Are the additional events on the AlgoTradeSubscription (AlertsFired and ExportValuesUpdated) only useful to receive metadata about the algo order or are they fundamental to executing the algo correctly?
These events are for the application to receive communications from the algo if desired. If the algo does not export params, for example, the application would not need to listen to the events.
ADL Algo orders can have an optional Instance Name. How is the ADL Algo order instance name set when using OrderProfile in the .NET SDK?
The “Instance Name” in TTW is tied to the TextTT field, so use TextTT.
Does the AlgoTradeSubscription receive events for all orders of the filtered Algo?
Yes
When receiving an event, how can I determine which order instance the event belongs to?
The application needs to track the parent and child relationship using the ParentOrderId and the OrderId of the orders.
The class Algo has an IsMyAlgo boolean property. What does this indicate about the algo?
IsMyAlgo indicates whether or not the current user is the owner of that algo.
How are algo templates managed in the SDK?
The SDK does not currently support algo templates.
UI Dispatcher Issues
AttachUIDispatcher() function not working
SDK UI Dispatcher is not supported for .NET 5.
If you are working with .NET 5, the SDK UI dispatcher is not supported because .NET 5 supports multiple OS platforms while the SDK UI dispatcher is specific to MS Windows. You can either use the worker dispatcher or wrap your own UI dispatcher that will work on the OS in which your app will be running.
For Windows users, TT suggests that users consider using System.Windows.Threading.Dispatcher to push messages to the UI.
How many dispatchers can I open at one point in time?
Applications can make as many dispatchers as they want and have them on as many threads as they want but at some point, but TT suggests avoiding excessive dispatchers.
See Class Dispatcher for more information.
What does it mean to have multiple server price threads in server-side mode?
A dispatcher is the same in client-side and server-side mode. A dispatcher can create a new thread or be attached to an existing thread.
What does it mean to have multiple server price threads in server-side mode?
Price threads in the configuration indicate how many threads the SDK will use to process price. This is not the number of dispatchers since those are created by the application. See Class TTAPIOptions for more information.
Instruments
Is it possible to retrieve all Autospreader instruments for their user alone (not ASEs shared from other users at their company). Is there any way to do this?
Please see the IsOwner property on the SpreadDetails.
How do I retrieve data via TT SDK.NET for particular spreads via name/alias?
The product type should be "MultilegInstrument" to look for a spread contract. For example: InstrumentKey key = new InstrumentKey(MarketId.CME, ProductType.MultilegInstrument, "GE", "GE Jun20-Sep20 Calendar");
I have created an Autospreader synthetic contract from C# code. Can you give me a code sample for changing the value of a parameter of a TT default Spread Rule from code? For example, how could I change the value of the InsideThrottle parameter of the (TT) Quote Throttle rule to 2000 ms from C#?
See Assigning Rules to a Spread.
Currently, to retrieve all the Instrument data from TT, I need to run the API call for every product in the system and some of those products have so many instruments that they need to make use of paging, so it ends up being more than 34,000 API calls. Is there a way to get the instruments in bulk?
No, there is not.
Is there a way to be able to invalidate/reload the instrument cache from the client-side TT SDK API? I am observing stale values after updating our ASE Synthetic instruments and have isolated it to a cache issue.
Tracking instrument updates is opt-in for the application because the SDK does get update notifications by default for performance reasons. Applications can opt-in by creating the InstrumentCatalogSubscription as shown below. If the application subscribes for updates with an InstrumentCatalogSubscription and a spread is changed/deleted/created, the SDK will get notified and update the spread definition in its internal collection.
spreadCatalog_ = new InstrumentCatalogSubscription(Product.Autospreader, callback_disp);
spreadCatalog_.OnData += OnSpreadDefinitionNotification;
spreadCatalog_.Start();
10:31
Server-Side
Can I run my NET5 or greater application in server mode?
No, the NET5 version of the SDK will not run server-side. If you need to run in server mode, you should use a 4x framework version with the 4.6 SDK. When a NET8 or greater version is available, it will support server mode.
I have 8 instances of my application running, each subscribing to just one instrument each and they all have SpinPriceThread = false, SpinPriceThreadCore = -1, PriceWaitMs = 100. Why am I seeing price latency?
You are running applications with a setup that will delay the price delivery because the thread pulling the prices off the nic is not spinning. It will only poll to get the prices every 100 milliseconds, so there will be inherent delays in getting the prices to the application. TT recommends spinning the price thread for the best performance, which is why that is the default configuration.
If you are running multiple apps, you should configure the SpinPriceThreadCore differently for each instance spinning the price thread. TT also recommends less than 6 total applications running at a time for optimal performance to bring the order and price messages up the network stack. The more app instances running, the more order messages will be sent from the DRO (it is point to point) so the last app can be more latent than the first in the receipt of order messages. If you are using a different account for each instance (see EnableAccountFiltering in the TTAPIOptions), this would not be an issue. The more apps that are running, the more resources they will be using. The threading and design of the applications should take into account the number of cores and network messages along with how many instances will be running at any time. It may be better to have more price threads in the SDK than to run multiple instances of the application.
What is the purpose of ServerPriceDelivery in the TTAPIOptions?
Setting ServerPriceDelivery in the TTAPI option to true will deliver price updates on the SDK thread rather than the dispatcher thread because this will eliminate the thread context switch.