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

RTD – Retrieving instrument IDs and properties

On this page

When retrieving instrument data using RTD, you need to specify the ID of the instrument and the properties you want to retrieve.

A TT RTD formula uses the following basic structure:

=RTD("tt.rtd",,"Topic1",...,"TopicN")

Note: The second parameter is the name of the external server running the RTD Server. As the TT RTD Server always runs locally, you must omit a value for the second parameter or supply an empty string (“”). However, you must account for the parameter in the formula.

Retrieving instrument IDs

Before you can access information about an instrument, you must first extract its ID using one of the following methods:

By name method

=RTD("tt.rtd",,"Inst","exchangeName","instrName")

The instrName argument corresponds to what is commonly called the short name for the instrument.

For example, if you want to retrieve the ID for the Jun16 GE futures contract from the CME exchange, you need only enter the following formula in a cell.

=RTD("tt.rtd",,"Inst","CME","GEM6")

After processing the formula, Excel displays the result in the cell, similar to the following:

You can now use the result shown in the cell to identify the instrument in other formulas in the spreadsheet. Typically, you would reference the cell (B3, in this case) to identify the instrument in other formulas.

By instrument details method

=RTD("tt.rtd",,"Instr","exchangeName","instrSymbol","productType","expiry"")

Note: When using the instrument details method, use “Instr” instead of “Inst” in the formula.

TT supports the following product types (must be all-caps):

  • FUTURE
  • SPREAD
  • OPTION
  • STRATEGY
  • BOND
  • ENERGY
  • STOCK
  • INDEX

For example, if you want to retrieve the ID for the Jun19 ES futures contract from the CME exchange, you need to enter the following formula in a cell.

=RTD("tt.rtd",,"Instr","CME","ES","FUTURE","Jun19")

By fills method

You can use the following formula to retrieve the IDs for all instruments for which you have traded at least one contract:

=RTD("tt.rtd",,"Inst","FILLS",CELL("Address",cell-reference))

This formula returns a one dimensional vertical array of the instrument IDs. To display this entire array, you would specify this same formula in a series of cells in Excel where each has a different value for the cell-reference argument. An empty string will be returned if you reference a member of this array that has no value.

The cell-reference values take the form “column,row“. For example:

You can now use the result shown in the cell to identify the instrument in other formulas in the spreadsheet. Typically, you would reference the cell to identify the instrument in other formulas.

Retrieving instrument properties

Once you have an instrument ID, you can use the following formula to retrieve properties associated with the instrument:

=RTD("tt.rtd",,inst-id,property,filter1,filterN)

The TT RTD Server supports two types of properties you can retrieve from TT:

Retrieving instrument properties: type 1

Type 1 properties for an instrument are those which return a single value and have no optional filters. They can be extracted with an RTD formula of the form:

=RTD("tt.rtd",,inst-id,property)

For example, if you stored the string “Last” in cell A13 and the instrument ID in cell B3, you could extract the last traded price in TT display format as follows:

=RTD("tt.rtd",,B3,A13)

After processing the formula, Excel displays the result in the cell, similar to the following. Note that the “$” in the cell references are Excel mixed reference notations.

Retrieving market depth

RTD also provides properties that return market depth (TTDepth) and detailed depth (TTDetailedDepth). The depth quantities combine direct and implied quantities at each price level. These properties can be retrieved using formulas in the following form:

=RTD("tt.rtd",,inst-id,depth-property,num-levels,cell-reference)

Note: The second parameter is the name of the external server running the RTD Server. As the TT RTD Server always runs locally, you must omit a value for the second parameter or supply an empty string (“”). However, you must account for the parameter in the formula.

The TTDepth property returns a 4xnum-levels in-memory array, as follows:

  • A1..Anum-levels : Bid quantity at each level
  • B1..Bnum-levels : Bid price at each level
  • C1..Cnum-levels : Ask price at each level
  • D1..Dnum-levels : Ask quantity at each level

The TTDetailedDepth property returns a 6xnum-levels in-memory array, as follows:

  • A1..Anum-levels : Bid quantity at each level
  • B1..Bnum-levels : Bid price at each level
  • C1..Cnum-levels : Ask price t each level
  • D1..Dnum-levels : Ask quantity at each level
  • E1..Enum-levels : Bid counterparty ID at each level
  • F1..Fnum-levels : Ask counterparty ID at each level

Note: For detailed depth, no counterparty IDs are returned for implied orders.

For example, to return ten levels of market depth for an instrument ID stored in cell G4, you can extract the depth as follows:

=RTD("tt.rtd",, $G$4, "TTDepth", "10", CELL("Address", A1)")

After processing the formula, Excel can be configured to display the results similar to the following market ladder.

  1. CELL(“Address”,A1)
  2. CELL(“Address”,B1)
  3. CELL(“Address”,C1)
  4. CELL(“Address”,D1)

The num-levels parameter indicates the size of the array to return, not necessarily the number of price levels.

  • For market depth (depth-property = TTDepth), the formula returns the first num-levels price levels on each side of the market that contain order quantities. Price levels with no direct or implied quantities are skipped.
  • For detailed depth (depth-property = TTDetailedDepth), the formula the first num-levels orders on each side of the market, irrespective of price levels. If a price level contains both direct and implied quantities, the individual direct quantities are returned first, followed by the aggregated implied quantity. The implied quantity is appended with an asterisk (*).

    Based on the requested num-levels, the results for detailed depth might return orders at one or more price levels and might return only a subset of orders at the outer price level. For example, suppose you specify 5 levels and the Buy side contains three orders (1 direct and 2 implied) at the first price level (100) and six orders (4 direct and 2 implied) and at the next price level (99). The returned array would include something similar to the following:
    • 2 at 100 (first order)
    • 4* at 100 (aggregated implied quantity for two orders at this price level)
    • 50 at 99 (first order at new price level)
    • 10 at 99 (second order at this level)
    • 5 at 99 (third order at this level)

    The remaining order quantities at the 99 price would not be returned. As such, care should be taken to ensure that the correct number of levels requested includes everything you expect.

Retrieving instrument properties: type 2

Type 2 properties for an instrument are those which return a single value and have optional filters. They can be extracted with an RTD formula of the form:

=RTD("tt.rtd",,inst-id,property,filter1,filter2,filterN)

You can use the Account attribute as a filter to limit the fills for which the TT RTD Server calculates values. For example, you might want the quantity of sell orders (SellQty property) of an instrument only if it was submitted through a specific account (Account attribute).

Note: As noted, you must specify at least one Account filter for some type 2 properties.

The format for a filter parameter in the formula is:

<property><operator><value>

For example, if you stored the string “AvgOpenPrice#” in cell A33, the string “Account=ATRSim” in cell A31, and the instrument ID in cell B3, you could extract the average open price in decimal as follows:

=RTD("tt.rtd",,B3,A33,A31)

After processing the formula, Excel displays the result in the cell, similar to the following. Note that the “$” in the cell references are Excel mixed reference notations.

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.