To support the FIX/FAST protocol, the BVMF Gateway uses the following:
- Hostinfo.cfg parameters: The gateway uses MulticastGroup parameters for FIX/FAST product subscriptions.
- BVMFTemplates.xml, BVMFEquitiesTemplates.xml files: The BVMFTemplates.xml files serve as an encoder/decoder between the exchange and the BVMF Gateway. There are separate templates for equities and derivatives products.
- MulticastGroups.cfg file: This configuration file contains connection information specific to product subscriptions.
BVMFTemplates.xml and BVMFEquitiesTemplates.xml
The BVMFTemplates.xml files are exchange-provided template files required to encode and decode the derivatives and equities market data feeds sent by the exchange. The files contain no user-configurable parameters. Any modifications to the contents of the files will result in incorrect parsing of the price feed.
To ensure that complete and accurate market data is being used on the BVMF Gateway, you must use the most recent version of each BVMFTemplates.xml file. Failure to do so results in incorrect parsing of the price feed and ultimately bad prices.
TT provides the updated version of the file as follows:
- Clean installation: Installing the latest version of the BVMF Gateway provides the most recent BVMFTemplates.xml files by default. These files are located in the <root drive>:ttconfig directory.
- Upgrade: When upgrading to the latest version of the gateway, the BVMF Gateway overwrites your existing BVMFTemplates.xml file with the most recent version.
- Customer Advisory: If the exchange updates the BVMFTemplates.xml file prior to a BVMF Gateway release, TT will issue a Customer Advisory with the most recent version. You must manually overwrite your existing file with the most current file.
Checking the BVMFTemplates.xml and BVMFEquitiesTemplates.xml Version
If you want to verify that you are using the latest template, the template files are also available via the BVMF exchange FTP server (ftp://ftp.bmf.com.br/FIXFAST/templates/Production/templates-UMDF-NTP.xml).
To check if you are using the latest BVMFTemplates.xml file
- Navigate to <drive letter>:ttconfig
- Using a text editor, open the BVMFTemplates.xml file and record the Version and Template ID number listed in the “NEXT AVAILABLE TEMPLATE ID IS #” line.
- Open the template on the BVMF exchange FTP server
and record the version numbers:
- Enter the following: ftp://ftp.bmf.com.br/FIXFAST/templates/Production/templates-UMDF-NTP.xml
- Record the Version and Template ID numbers listed in the “NEXT AVAILABLE TEMPLATE ID IS #” line.
- Compare your version of the template with the
one on the gateway:
- If the Version and Template ID numbers are the same in both files, you have the latest template.
- If the Version or Template ID numbers are different, you need to update your BVMFTemplates.xml file. Apply the latest template you received from TT via a Customer Advisory, or download and save the template from the BVMF ftp site and apply it to the gateway.
Applying the BVMFTemplates.xml File
A new template file can be applied at anytime, but it is not processed until the next time you restart the Price Server.
To apply the BVMFTemplates.xml file to the BVMF Gateway
- Navigate to <drive letter>:ttconfig
- Back up the existing BVMFTemplates.xml file.
- Locate the new BVMFTemplates.xml file that you received via Customer Advisory, and copy it into this directory.
- If you are applying the new template intra-week, restart the
Price Server after the trading session:
- From the Windows Control Panel, double-click Administrative Tools.
- Double-click Services.
- Scroll to the TT BVMF Price Server, click it, and click Restart the service.
FIX/FAST Message Recovery
The BVMF Gateway order book is updated incrementally with market data per contract. If message recovery is necessary, the BVMF Gateway subscribes to snapshot channels to update the entire Order Book. Because the snapshot updates occur at a high message rate, subscribing to all snapshot channels simultaneously is not recommended. To help alleviate recovery issues, the Price Server is configured by default to do the following:
- Use FIX/FAST incremental updates to refresh the Order Book.
- Subscribe to the snapshot channels only when the incremental update has not refreshed the entire Order Book.
- Dynamically subscribe to snapshot recovery channels as needed.
- Only subscribe to snapshot channels for contracts with active price subscriptions. However, if an order is entered outside the displayed levels of depth for a contract that missed an inside market price update, the Price Server will not request a snapshot to refresh the Order Book. If an order is entered within the levels of depth, the snapshot is requested as needed.
Optionally, you can configure the Price Server to subscribe to the TCP Recovery channel for market data retransmission. When enabled, the Price Server will connect to this channel first to recover any lost packets before using incremental refresh or requesting a snapshot. For TCP retransmission, the Price Server recovers missing packets based on missing sequence numbers and does not attempt to recover the entire Order Book.
If a restart or mid-week startup is necessary, the BVMF Gateway is configured by default to do the following:
- Dynamically subscribe to instrument definition channels.
- Perform incremental price updates to the Order Book only after instrument definition updates are complete.
If there is missing price data for a product and a snapshot is requested, the Price Server clears the existing Order Book before refreshing it with the snapshot. This is by design and not the result of the client application (e.g., Autospreader®) deleting data from the Order Book prior to a snapshot. The occurrence of frequent snapshots may be an indication of capacity or performance issues within the network.
Emergency Order Book Reset
If there’s a failure on BVMF’s UMDF platform that could corrupt the market data on a particular channel, the exchange will initiate an Emergency Order Book Reset. During this event, the exchange clears and refreshes market data for all products on the impacted channel for both the incremental and snapshot recovery feeds.
In response to the reset, the BVMF Gateway clears the market data for all products on the impacted channel and processes the recovered, up-to-date data as it becomes available on the feed.
The following events occur during an Emergency Order Book Reset.
- The exchange sends a reset message down the incremental feed to the BVMF Gateway to indicate the market data on the channel is corrupted.
- The BVMF Gateway clears market data for all the products
on the impacted channel and writes the following message to the
Price Server log file:
Example Price Server log message in response to Emergency Order Book Reset
23.07.2011 10:12:30.660 | PRICESERVER/PROD | 1232 | INFO | 00000000 | PriceServer/FASTPriceBridge/FASTPriceBridge/BVMF_FX_FUTURES | Resetting All Order Books on the Channel.
- The exchange begins restoring market data for all products on the impacted channel.
- Once the market data for a product is restored, the exchange resumes sending incremental updates for that product.
- The BVMF Gateway processes the restored market data in real-time
for each product on the channel, and writes the following message
to the Price Server log file for each contract as it is reset:
Example Price Server log message indicating a contract is reset
23.07.2011 10:12:30.660 | PRICESERVER/PROD | 1232 | INFO | 00000000 | PriceServer/FASTPriceBridge/FASTPriceBridge/BVMF_FX_FUTURES | Resetting Contract Sequence Number To 1: DI1
- Trading for the restored product can continue as normal while other products on the channel are going through the reset process.
The MulticastGroups.cfg File
To assist with price data subscriptions, the BVMF Gateway uses the MulticastGroups.cfg file.
This additional configuration file aids in managing price data; however, it does not require manual updates. Do not edit this configuration file.
The MulticastGroups.cfg is simply an index file that maps connectivity information to the various multicast groups that the BVMF broadcasts usingFIX/FAST messages over the UMDF feed. The MulticastGroups.cfg file stores connection information for multicast group data in unique channel sections. By default, the BVMF Gateway does not automatically download all of the various feeds configured in the MulticastGroups.cfg file. To download the feed for a particular multicast group, you must add a MulticastGroup#=multicast group line to the [PriceServer] section in the hostinfo.cfg (for details on this parameter, refer to BVMF_<Multicast Group> Parameters).
BVMF_<Multicast Group> Parameters
By default the BVMF Gateway installs with a MulticastGroups.cfg file configured to download all possible multicast group types from the exchange. If BVMF adds a new multicast group (i.e., set of product information) at a later time, TT will send out a Customer Advisory informing customers what changes they may need to make.
This is the section title. All sections in the MulticastGroups.cfg file use this section title; there are no variables.
Sets the multicast group name of the data that the BVMF Gateway can request. To request this data, you must include a MulticastGroup parameter in the [PriceServer] section of the hostinfo.cfg with this multicast group as its value.
A variable number, starting at 1, that uniquely identifies the [BVMF_<Multicast Group>] section. BVMF specifies this value.
This parameter sets the IP address and port that the BVMF uses to broadcast the multicast group data (as specified in the multicast group parameter). For purposes of disaster recovery, each [BVMF_<Multicast Group>] section can contain multiple AddressFeed* parameters. The exchange specifies these values.
* is a wildcard and uniquely identifies a feed for the data that the specified IPAddress:Port distributes.
You include the line item AddressFeedA=188.8.131.52:10012
This sets the TT Gateway to obtain multicast group data from IP Address 184.108.40.206 and port 10012. This feed is labeled FeedA for purposes of routing.
Sets the IP address and port that the BVMF uses to broadcast the instrument definition data.
Sets the IP address and port that the BVMF uses to broadcast snapshots of market data activity.