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
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 on TT
Description
Videos
Options Chain
Description
Task
Use Cases
Videos
Reference
Options Trade Monitor
Description
Task
Videos
Reference
Vol Curve Manager
Description
Task
Use Cases
Videos
Reference
Electronic Eye
Description
Task
Videos
Reference
RFQ Viewer
Description
Task
Videos
Reference
RFQ with Counterparties
Description
Task
Counterparty Manager
Description
Task
Strategy Creation
Description
Task
Use Cases
Reference
Options Risk
Description
Task
Videos
Reference
Options Risk Matrix
Description
Task
Videos
Reference
Watchlist
Description
Task
Videos
Reference
Expiration Manager
Description
Task
Volatility Calculator
Description
Task
TT Uncovered 2.0
Description
Task
TT Uncovered 3.0
Description
Task
QuikStrike
Description
Task
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
B3
Description
Task
CBOE
Description
Task
Cboe FX
Description
Task
Reference
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
Task
Referece
ICE
Description
Task
MexDer
Description
Task
MIAX_FUT_CH
Description
Task
MIAX_FUT_NY
Description
Task
MX
Description
Task
Nodal
Description
Task
NFI
Task
Exchanges: EMEA
ATHEX
Description
Task
BIST
Description
Task
DGCX
Description
Task
EEX
Description
Task
EPEX SPOT
Description
Task
Reference
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
NDAQ_EU
Description
Task
NASDAQ_NED
Description
Task
Nord Pool
Description
Task
Reference
WSE
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
Wachlists
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

Retrieving working orders and fills

On this page

The TT RTD Server allows you to retrieve information about working orders and fills, such as the columns available in the Order Book and Fills widgets, using various RTD formulas. You can:

Working with order and fill sets

An RTD Server application accesses order and fill data through order sets and fill sets, respectively. These sets let you define a subset of orders or fills based on user-defined filtering criteria.

When you create an order set, for example, you create a set of selection rules, called an order selector ID that identifies which of the current orders you want to include in the set. For example, you might create one order set that contains all U.S. 30-Year Treasury Bond (ZB) orders and another order set that contains all buy orders. Also, individual orders can appear in multiple order sets.

The following illustration shows three order sets that provide different views into the whole order book.

Likewise, a fill set lets you use filters to create a subset of fills. For example, you could create one fill set that contains buy-side fills and another fill set that contains only full fills for a specific account.

The following RTD formulas return the selector IDs you can use to retreive information about working orders and fills, respectively.

=RTD("tt.rtd",,"OS",filter-criteria)
=RTD("tt.rtd",,"FS",filter-criteria)

where filter-criteria contains comma-separated strings of filters using the form:

<column-name><operator><value>

where column-name is the name of an Order Book column or Fills column, as well as any input and output parameters of an algo order.

Notes:

  • 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 name and value of each property must match exactly, including capitals, spaces, and special characters.

For example, to create an order set that includes all orders for the ES product on the CME exchange using account ABCDEF, you would enter the following RTD formula:

=RTD("tt.rtd",,"OS","Exch=CME","Product=ES","Account=ABCDEF")

Retrieving working orders

You can use RTD to create custom order books in your spreadsheet. You can use an order set to focus on a particular set of orders and, for each order, include values for columns available in the Order Book.

The RTD formula for retrieving order information uses the following format:

=RTD("tt.rtd",,"Orders",orderbook-columns,num-orders,orderset-id,cell-address)

where:

  • orderbook-columns is a comma-separated list of one or more Order Book columns whose values you want to return. Note: Add Price# as an attribute for RTD orders and fills to retrieve the raw unformatted price.
  • num-orders indicates the number of working orders to return. You can use the following methods to specify the number:
    • “*” for all working orders matching the selected filter criteria.
    • “last*n or n for the n most recent working orders. By using this option, you don’t have to handle scrolling lists or to organize the orders, because your spreadsheet always displays the ten most recent orders.
    • “first*n or n for the first n working orders.
    • n:m for the range of working orders between n and m, inclusively.
  • orderset-id is an optional order set ID returned from the OS formula to filter the orders. If you omit this parameter, you must account for it in the formula with a comma. Also, if you omit this parameter, the formula will return unfiltered orders.
  • cell-address is the address of the internal, temporary spreadsheet that contains the array of values specified by the orderbook-columns parameter

For example, the following RTD formula retrieves values of six columns for the ten most recent orders within the order set referenced in cell B3. It returns the values in a 6×10 array starting in cell E1.

=RTD("tt.rtd",,"Orders","Exch,Product,Contract,OrdQty,Price,Account","last*10",B3, CELL("Address", E1))

Retrieving order statistics

You can use RTD to track changes in statistics related to working orders in an order set, such as the number of matching Buy orders.

The RTD formula for retrieving order information uses the following format:

=RTD("tt.rtd",,"OrderStats",orderset-id,orderstat-column,cell-address)

where:

  • orderset-id is an optional order set ID returned from the OS formula to filter the orders. If you omit this parameter, you must account for it in the formula with a comma. Also, if you omit this parameter, the formula will return unfiltered orders.
  • orderstat-column is one of the following Order Book columns:
    • BuyCnt
    • SellCnt
    • NetCnt
    • BuyWrk
    • SellWrk
    • NetWrk
    • BuyPos
    • SellPos
    • NetPos

For example, the following RTD formula retrieves number of working Buy orders within the order set referenced in cell B3.

=RTD("tt.rtd",,"OrderStats",B3,"BuyCnt")

Retrieving fills

You can use RTD to monitor fills in your spreadsheet. You can use a fill set to focus on fills for a particular set of orders and, for each fill, include values for columns available in the Fills widget.

The RTD formula for retrieving fill information uses the following format:

=RTD("tt.rtd",,"TTFills",fills-columns,num-fills,fillset-id,cell-address)

where:

  • fills-columns is a comma-separated list of one or more Fills columns whose values you want to return. Note: Add Price# as an attribute for RTD orders and fills to retrieve the raw unformatted price.
  • num-fills indicates the number of fills to return. You can use the following methods to specify the number:
    • “*” for all fills for orders in the specified order set.
    • “last*n or n for the n most recent fills. By using this option, you don’t have to handle scrolling lists or to organize the fills, because your spreadsheet always displays the ten most recent fills.
    • “first*n or n for the first n fills.
    • n:m for the range of fills between n and m, inclusively.
  • fillset-id is an optional order set ID returned from the TTFills formula to filter the fills. If you omit this parameter, you must account for it in the formula with a comma. Also, if you omit this parameter, the formula will return all fills.
  • cell-address is the address of the internal, temporary spreadsheet that contains the array of values specified by the fills-columns parameter

For example, the following RTD formula retrieves values of seven columns for the ten most recent fills for the orders defined by the fill set referenced in cell B3. It returns the values in a 7×10 array starting in cell E1.

=RTD("tt.rtd",,"TTFills","Time,Exch,Contract,Price,FillQty,Fill Type,Account","last*10",B3,CELL("Address", E1))

Retrieving fill statistics

You can use RTD to track changes in statistics related to fills in a fill set, such as the net position for matching fills.

The RTD formula for retrieving order information uses the following format:

=RTD("tt.rtd",,"FillStats",fillset-id,fillstat-column,cell-address)

where:

  • fillset-id is an optional order set ID returned from the TTFills formula to filter the fills. If you omit this parameter, you must account for it in the formula with a comma. Also, if you omit this parameter, the formula will return all fills.
  • fillstat-column is one of the following Fills columns:
    • BuyFillCnt
    • SellFillCnt
    • NetFillCnt
    • BuyPos
    • SellPos
    • NetPos
    • AvgBuyPrice
    • AvgSellPrice
    • AvgOpenPrice

For example, the following RTD formula retrieves the net position of all fills within the fill set referenced in cell B3.

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