Trade
Overview
TT Platform
Description
Task
Browser Access
Description
Task
Videos
TT Desktop
Description
Task
Videos
Reference
Workspace Windows
Description
Task
Videos
Widgets
Description
Task
Preferences
Description
Viewing Market Data
Time and Sales
Task
Reference
Description
Depth
Description
Task
Reference
Market Grid
Description
Task
Videos
Reference
Product Grid
Description
Task
Reference
Spread Matrix
Description
Task
Videos
Reference
Position in Queue (PIQ)
Basic Order Entry
TT Order Types
Description
Task
Videos
Reference
Case Studies
TT Premium Order Types
Description
Task
Reference
Order Ticket
Description
Task
Use Cases
Reference
MD Trader®
Description
Task
Videos
Reference
Order Profiles
Description
Task
Reference
Routing Rules
Description
Task
Blocktrader
Description
Task
Videos
Reference
Trading Crypto on TT
Description
Task
Videos
Reference
Trading on B3
Order Management
Order Book
Description
Task
Reference
Floating Order Book
Description
Task
Reference
Fills
Description
Task
Reference
Positions
Description
Task
Reference
Orders and Fills
Description
Task
Reference
Audit Trail
Description
Task
Reference
Audit Query
Description
Task
Reference
Account List
Description
Task
Videos
Reference
Position Manager
Description
Task
Reference
Alert Manager and Alert Viewer
Description
Task
Videos
Reference
Account & User Restrictions
Description
Task
Reference
Balances
Description
Task
Reference
TT® OMS
Care Orders
Description
Task
Videos
Reference
Lock and Release
Description
Task
Bulking
Description
Task
Videos
Stitching and Splitting
Description
Task
Combining
Description
Task
Order Passing
Description
Task
Use Cases
Order Exceptions
Description
Task
Options
Options Risk
Description
Task
Videos
Reference
QuikStrike
Description
Task
TT Uncovered 3.0
Description
Task
TT Uncovered 2.0
Description
Task
Volatility Calculator
Description
Task
Expiration Manager
Description
Task
Watchlist
Description
Task
Videos
Reference
Options Risk Matrix
Description
Task
Videos
Reference
Options on TT
Description
Videos
Strategy Creation
Description
Task
Use Cases
Reference
Counterparty Manager
Description
Task
RFQ with Counterparties
Description
Task
RFQ Viewer
Description
Task
Videos
Reference
Electronic Eye
Description
Task
Videos
Reference
Vol Curve Manager
Description
Task
Use Cases
Videos
Reference
Options Trade Monitor
Description
Task
Videos
Reference
Options Chain
Description
Task
Use Cases
Videos
Reference
Spread Trading
Autospreader
Description
Task
Use Cases
Videos
Reference
Autospreader Rules
Description
Task
Videos
Reference
Hedge Manager
Description
Task
Videos
Reference
Trading in Yield
Description
Task
Use Cases
Reference
Aggregator
Description
Task
Videos
Reference
Algo Trading
Algo Dashboard
Description
Task
Videos
Reference
Template Manager
Description
Task
Order Management Algos (OMAs)
Autotrader
Description
Task
Reference
Videos
Excel integration with TT
Description
Task
Videos
Reference
Market-Making Algos
Analytics
Charts
Description
Technical Indicators
Task
Videos
Reference
Trader Analytics
Description
Task
Reference
ADL
ADL Overview
Introduction to ADL
Description
Task
Videos
Reference
ADL Basic Concepts
Description
Task
Reference
Building your first algo
Lessons
Advanced concepts
Description
Task
Case Studies
Jump blocks
Group blocks
Virtualized blocks
Library blocks
Trading Blocks
Discrete blocks
Arithmetic blocks
Basic blocks
Logic blocks
Miscellaneous blocks
Setup
Setup Overview
Getting Started
Description
Task
Videos
Reference
Supported Order Types and TIFs
Company Administration
Connections
Description
Task
Videos
Reference
Accounts
Description
Task
Videos
Use Cases
Reference
Users
Description
Task
Videos
Reference
Company
Description
Task
Reference
Order Tag Defaults
Description
Task
Account Administrators
Description
Task
TT Premium Services
Description
Task
TT Access
Description
Task
Advanced Features
Description
Risk Management
Risk Administration
Description
Task
Risk Limits
Description
Task
Videos
Reference
Pre-Trade Portfolio Risk
Description
Task
Reference
Order Cross Prevention
Description
Task
Videos
KRM Limits
Description
Task
TT® OMS
TT OMS Administration
Description
Task
Use Cases
Reference
Exchanges: Americas
FMX
Description
Task
NFI
Task
Nodal
Description
Task
MX
Description
Task
MIAX_FUT_NY
Description
Task
MIAX_FUT_CH
Description
Task
MexDer
Description
Task
ICE
Description
Task
Goldman Sachs Commodity Blocks (GSCB)
Description
Task
Referece
FMX_USTF
Description
Task
B3
Description
Task
Fenics
Description
Task
EBS Market
Description
Task
EBS Direct
Description
Task
Dealerweb
Description
Task
CME
Description
Task
CFE
Description
Task
Cboe FX
Description
Task
Reference
CBOE
Description
Task
Exchanges: EMEA
ICE_L
Description
Task
WSE
Description
Task
Nord Pool
Description
Task
Reference
NASDAQ_NED
Description
Task
NDAQ_EU
Description
Task
MEFF
Description
Task
LSE
Description
Task
LME NTP
Description
Task
LME
Description
Task
JSE
Description
Task
ATHEX
Description
Task
GFO-X
Description
Task
Euronext
Description
Task
Eurex
Description
Task
Videos
Eris
Description
Task
EPEX SPOT
Description
Task
Reference
EEX
Description
Task
DGCX
Description
Task
BIST
Description
Task
Exchanges: Asia/Pacific
ABX
Description
Task
ASX
Description
Task
FEX
Description
Task
HKEx
Description
Task
JPX
Description
Task
NSE
Description
Task
NZX
Description
Task
SGX
Description
Task
SGX GIFT
Description
Task
TAIFEX
Description
Task
TFEX
Description
Task
TFX
Description
Task
CoinFLEX
Task
Exchanges: Crypto
Coinbase
Description
Task
Kraken
Description
Task
FIX Support
FIX Ruleset
Description
Task
FIX Sessions
Description
Task
Secondary Accounts
Description
Task
Monitor
TT Mobile
TT Backtesting
APIs
TT REST API 2.0
Getting Started
API Reference
TT REST API 2.0 (UAT)
Getting Started
API Reference
TT .NET SDK
Getting started with TT .NET SDK
Creating the application framework
Working with instruments
Subscribing for market data
More about prices
An in-depth look at the Price class
Working with orders and fills
Handling trade subscriptions
Working with trade subscriptions
Working with Algos
Algo Server
TT Order Types
TT Premium Order Types
Advanced Concepts and Options
Appendix
TT CORE SDK
Getting Started with TT Core SDK
Creating Application Framework
Working With Instruments
Subscribing for Market Data
Working with Orders and Fills
Creating a TT Application Server
Appendix
TT Trade Surveillance
Overview
Using TT Trade Surveillance
Cluster View
Core Models
Market Abuse Models
Cross Product Models
Spoofing Models
Improperly Matched Trade Models
Market Rate Models
Trading Behaviors Models
Miscellaneous Models
Configurable Models
Reports
Reference
TT FIX Services
TT FIX General
Getting Started
FIX Message Structure
Session messages
TT FIX Order Routing
Overview
TT FIX message conversations
Supported application messages
TT FIX Market Data
Overview
TT FIX message conversations
Supported application messages
TT FIX Drop Copy Out
Overview
TT FIX Message Conversations
Supported application messages
Compliance Feed messages
TT FIX Drop Copy In
Overview
Supported application messages
TT FIX Gateway
Getting Started
FIX Message Structure
Components
Session messages
Price Gateway Messages
Order Gateway Messages
TT FIX Recovery
Overview
FIX Recovery Methods
Supported application messages
Compliance Feed Messages
MiFID II Support

Managing subscription events

The signature of the methods to which event handler delegates point takes the form:

The first argument is a reference to the request object. As it is passed as a System.Object, you must cast it to the appropriate type of the request object before using it. The following example shows how to cast the request sender as an InstrumentLookup object:

Market data subscription classes

TT .NET SDK provides the following classes to access market data.

This class can be used to subscribe for market data for Autospreader and Aggregator instruments as well.

Subscribing for market data

The TT .NET SDK delivers live market updates to the application through subscriptions associated with the types of data. As with all subscriptions, you must create the subscription object, set any options, register for events, and start the subscription.

Note: In Client Side mode, inside market data (best bid, best, ask, etc.) is coalesced at 35ms and full market depth is coalesced at 80ms. In Server Side mode, market data is uncoalesced.

Note: In Server Side mode, market data subscriptions are throttled at 500 per second and applications are limited to making no more than 15,000 market data subscriptions.

Note: In Server Side mode, applications are limited to making market data subscriptions from no more than 4 unique markets.

Note: The use of TT .NET SDK Server Side mode is not suitable for applications which require Time & Sales. Such applications should use TT Core SDK or TT .NET SDK Client Side

Working with options

TT’s Options trading tools provide traders with all the tools they need to view and analyze option markets, identify opportunities, and assess position risk. TT’s Advanced Options Package is an add-on that enables options analytics and other powerful tools for viewing and trading options. If you are permissioned for this feature, you can also access the options chain through TT .NET SDK.

Process for creating options chain subscriptions

To create an options chain subscription and start receiving updates, you:

Subscribing for options chains

The following snippet demonstrates how to instantiate an OptionsChainSubscription instance with specifying a low and high strike in the constructor.

Creating the subscription event handler

After the subscription starts, TT .NET SDK retrieves the options chain and invokes the event handler method you registered with the subscription. Subsequent events are then fired as the options chain changes.

The following code snippet shows the structure of a sample options chain subscription event handler method:

Working with price subscriptions

Process for creating price subscriptions

To create a price subscription and start receiving updates, you:

Warning : TT strongly recommends users maintain their price subscriptions. To prevent issues, users must avoid unsubscribing and immediately resubscribing to market updates.

Subscribing for market data

Typically, you start a price subscription for an Instrument when TT .NET SDK fires the Update event for the InstrumentLookup object you created to find the Instrument.

The following snippet modifies the OnData event handler to start a price subscription for market depth data.

Creating the subscription event handler

After the subscription starts, TT .NET SDK retrieves all of the market data for the Instrument and invokes the event handler method you registered with the subscription. TT .NET SDK fires the FieldsUpdated event with the FieldsUpdatedEventArgs.UpdateType property set to UpdateType.Snapshot for the initial market data snapshot. You can use the PriceSubscriptionFields.GetFieldIds method to process all of market data. Subsequently, when any of the market data fields change, TT .NET SDK sets the FieldsUpdatedEventArgs.UpdateType property to UpdateType.Incremental to indicate that only some of the market data changed. In this case, you can use the PriceSubscriptionFields.GetChangedFieldIds method to retrieve the ids of only the fields whose values changed.

The following code snippet shows the structure of a sample price subscription event handler method.

Extracting market data values

FieldId is an enumerated type defining the set of valid market data fields, such as DirectBidPrice, DirectBidQuantity, etc. When used as an index to extract market data fields from the Fields property of the FieldsUpdatedEventArgs object, it returns a Field object.

To extract the actual value, you can call the FormattedValue property of the tt_net_sdk.Field object, for example:

You can also use the FormattedValue property of the tt_net_sdk.Field object object to reference to the Object storing the value. You can then cast it to its real type. For example:

Alternatively, you can access specific tt_net_sdk.Field values directly without needing to cast the return value, as follows:

Working with prices and quantities

Working with the Price class

For efficiency, TT .NET SDK processes and stores prices as integer values. However, you can represent price in different formats, such as Double or String, and in styles such as Ticks. You also might want to perform mathematical calculations with these prices. TT .NET SDK exposes this functionality in the Price object.

The following snippet shows some of the ways you can manipulate prices.

Note

TT .NET SDK guarantees that any Price object returned from a price subscription is a valid object. However, because the underlying value might be invalid or null. To ensure that a price contains a valid value, you should check the Price.IsValid property of the returned object before using its value.

Working with the Quantity class

As quantities can also be expressed in a variety of ways, TT .NET SDK exposes a Quantity class. This class allows you to extract order quantities in Lots and Flow (e.g. Energy contracts). For example:

The Quantity class also supports the increment and decrement operators, which are particularly useful when changing the quantity of a contract that trades in flow.

Note

TT .NET SDK guarantees that any Quantity object returned from a price subscription is a valid object. However, because the underlying value might be invalid or null. To ensure that a quantity contains a valid value, you should check the Quantity property of the returned object before using its value.

Other ways to use the Price and Quantity classes

The Price and Quantity classes also contain a series of useful static methods that allow you to create instances directly. For example, assume your application allows users to enter prices (ps) and quantities (qs) as strings. To convert a string representation of a price to a Price class or a quantity string to a Quantity class for a given Instrument (instr), you could use the static Price.FromString (or Quantity.FromString) method as follows.

Working with time and sales subscriptions

Subscribing for time and sales data

Time and Sales subscriptions follow the same pattern as other subscriptions within TT .NET SDK. You create the TimeAndSalesSubscription, attach the event handler, and then start the subscription, as shown in the following example.

Creating the subscription event handler

Because many trades can occur within a short time span, when TT .NET SDK fires the TimeAndSalesSubscription.Update event, it passes a collection of TimeAndSalesData objects in the TimeAndSalesEventArgs event handler parameter, where each object represents a single trade that occurred for this contract. The following code snippet shows the basic structure of a sample callback for the TimeAndSalesSubscription.Update event.

Subcategories

More about prices
An in-depth look at the Price class
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

Analytics

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

Marketing

This website uses the following additional cookies:

(List the cookies that you are using on the website here.)