Template Overview

CQG provides a single xml file that contains a collection of templates and is shared across all market data channels between the encoder (CQG side) and decoder (customer side). Each template has a unique template ID that describes the format of an encoded message. A template ID is carried in every encoded message to provide a reference to the correct template for decoding purposes.

A template selection process should be carried out on the customer side. The decoder should dynamically identify and retrieve the correct template indicated in the encoded message, then use that template to decode the message.

 

Note: Since the templates file is unified for both Market Data Quotes Direct and News over Quotes Direct systems, some template elements may apply only to one system. Those can be safely ignored by other system clients.

XML Template Example

A template consists of Field Instructions that define the fields contained in the message. Field Instructions specify the field name, tag number, data type, field operator, and presence attribute that indicates if a field is optional or mandatory.

A sample market data template is shown below. The syntax is standard XML and can be parsed using a variety of open source tools. Valid template syntax is determined by the FAST Template Schema which is available in the FAST v1.1 specification.

The real-time feed templates are based on the Market Data Incremental Refresh message type.

The information contained in a template is passed to the client FAST decoder at run-time such that the decoder recognizes how each field is encoded in terms of data type representation (Transfer) and data redundancy removal (Field).

The template is constructed of several sections including Template Identification, Header, Body and Sequence. Template Identification provides the template name and identifier. The Header includes FIX header fields such as ApplVerID (tag 1128), MsgType (tag 35), and SendingTime (tag 52). The Body provides information common across all repeating groups. Sequence represents a repeating group with a corresponding length field and a set of repeating group fields which carry the detailed entry information.

Template Implementation Considerations

Before implementing the template functionality, consider handling the following template changes without any changes to the decoder:

Note: Customers will be notified 2-4 weeks prior to a template change.

Template Change

Decoder Impact

Template Release Plan

Additional Information

New Tags (CQG originated)

none

A template that contains a new tag (CQG originated) will be released in the New Release Certification environment approximately 4 weeks prior to Production environment (and Certification environment) roll-out.

A new tag may be defined as a result of a change in the business logic (which client systems can choose to implement or not). This change should not require a modification to the client system decoder, however, there may be changes required to the clients back-end systems if they choose to implement this change.

New Tags (FIX originated)

none

A template that contains a new tag (FIX originated) will be released in the New Release environment approximately 4 weeks prior to Production environment (and Certification environment) roll-out.

A new tag may be defined as a result of a change in the business logic (which client systems can choose to implement or not). This change should not require a modification to the client system decoder, however, there may be changes required to the clients back-end systems if they choose to implement this change.

Removed Tags

none

A template in which a tag is no longer available will be released in the New Release environment approximately 4 weeks prior to Production environment (and Certification environment) roll-out.

A tag may be removed, for example, if it is no longer needed.

Modified Tags

none

A template that contains a modified tag will be released in the New Release environment approximately 4 weeks prior to Production environment (and Certification environment) roll-out.

A modification to an existing tag may be defined as a result of a change in the business logic (which client systems can choose to implement or not). This tag modification should not require a modification to the client system decoder, however, there may be changes required to the clients backend systems if they choose to implement this change.

Rename or Reorder Tags

none

A template that contains a renamed or reordered tag will be released in the New Release environment approximately 2 weeks prior to Production environment (and Certification environment) roll-out.

A renamed or reordered tag may be defined to increased efficiency. This tag modification should not require a modification to the client system decoder, however, there may be changes required to the clients back-end systems if they choose to implement this change.

New Message Types

none

A template that contains a new message type will be released in the New Release environment approximately 4 weeks prior to Production environment roll-out.

A new message type may be defined as a result of an enhanced CQG functionality, or a change in business logic (which FIX client systems can choose to implement or not). This change should not require a modification to the FIX client system decoder, however, there may be changes required to the clients back-end systems if they choose to implement this change.

Modified Operators

none

A template that contains a modified operator will be released in the New Release environment approximately 2 weeks prior to Production environment roll-out.

 

Modified Data Types

none

A template that contains a modified data type will be released in the New Release environment approximately 2 weeks prior to Production environment roll-out.

 

Template Distribution

The current template for each environment is available for download from an FTP site. Refer to Services - Template Dissemination, Market Data Configuration for an outline of the process.

Note: CQG strongly recommends that you download the current templates.xml file every Sunday prior to market open.

Historical templates.xml files will be maintained on the FTP site and stored in a directory indicating the dates they were effective. The historical templates will be moved to the “Archive” directory for the corresponding environment.