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:
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:
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")
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:
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 6x10 array starting in cell E1.
=RTD("tt.rtd",,"Orders","Exch,Product,Contract,OrdQty,Price,Account","last*10",B3, CELL("Address", E1))
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:
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")
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:
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 7x10 array starting in cell E1.
=RTD("tt.rtd",,"TTFills","Time,Exch,Contract,Price,FillQty,Fill Type,Account","last*10",B3,CELL("Address", E1))
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:
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")