Historical Time&Sales File Specifications

Modified on 2011/09/05 00:03 by Administrator — Categorized as: Feeds, Specs

Overview

Here you will find the specifications for the downloadable Time&Sales files for individual stocks. Time&Sales data contains only records of executed orders, also known as traded volume. The data also contains executions for non-displayed orders (orders that are not present in the book), also referred to as non-cross trades. There are the following formats available:

You might want to consult with the Nasdaq's TotalView-ITCH 3.0 and Nasdaq's TotalView-ITCH 4.0 specifications for the native data stream as well.

Historical Time&Sales: Table Files

Description

Table files are designed to be more user friendly than other formats. Column tables are padded with spaces to align the data vertically with headers. The first row is always the header row. An empty line is added at the end of the table to indicate the end of file.

Column Format

Column Width Value Description
Timestamp 8 Unsigned 32-bit Number of milliseconds after the midnight.
T 1 Character Message type. Allowed values:
  • "B" -- A "Buy" order was executed
  • "S" -- A "Sell" order was executed
Shares 6 Unsigned 32-bit Indicates how many shares were actually traded.
Price 10 Unsigned 32-bit Original order price. The last 4 digits are decimal digits. The decimal portion is padded on the right with zeros. The decimal point is implied by position; it does not appear inside the price field. Divide by 10000 to convert into currency value.
MPID 4 Text Market Participant ID associated with the transaction.

Historical Time&Sales: CSV Files

Description

Character-separated-value (CSV) files are designed for importing to other applications, such as statistical packages. Columns are separated by a special delimiter character. The default delimiter is ",". The data is not padded with spaces for vertical alignment. The first row is always the header row. An empty line is added at the end of the table to indicate the end of file.

Column Format

The column format is the same as in the Table Format.

Historical Time&Sales: XML Files

Description

XML files are designed for use in real time applications. XML also contains information about the session date and requested stock. Column tables are padded with spaces to align the data vertically with headers. The first row is always the header row. An empty line is added at the end of the table to indicate the end of file.

XML Format

Element Description Attributes Contains
<session> Session information that contains session type, session date, stock ticker, and related records.

date="string": session date in YYYYMMDD format

ticker="string": stock ticker string

type="TimeAndSales": session type, equals "TimeAndSales" string

Any number of <sales> elements
<sales> Time&Sales record that contains timestamp and order parameters.

timestamp="unsigned 32-bit": number of milliseconds after the midnight

type="string": Original order type in string format. Allowed values:

  • "buy-order" -- A "Buy" order was executed
  • "sell-order" -- A "Sell" order was executed

The following mandatory elements:

  • <price>
  • <quantity>
<price> Original order price. The last 4 digits are decimal digits. The decimal portion is padded on the right with zeros. The decimal point is implied by position; it does not appear inside the price field. Divide by 10000 to convert into currency value. None Unsigned 32-bit
<quantity> Indicates how many shares were actually traded. None Unsigned 32-bit
<mpid> Market Participant ID associated with the transaction. None Text