Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Is B2BITS ICE Trade Capture Solution certified by ICE

Yes, B2BITS ICE Trade Capture Solution is a certified software. You can find us among ICE Trade Capture Vendors listed on the ICE website - https://www.theice.com/connectivity/trade-capture-vendors.

How to deploy the package and make it work

Follow the step-by-step instruction below:

...

Create a database itself. ‘ICE_Trades’ is suggested as the default name.

...

Change it, if necessary. For more information please refer to SQL Server technical manual.

...

  1. ICE Handler property file (ICEProperties.properties)
    1.  Specify SenderCompID for:
      1.  The ICESession property so that its final format is: SenderCompID[SOH]TargetCompID
      2. The ICESession.SenderCompID property
    2. Add security definitions subscriptions to the necessary markets using provided examples in the "Security Definition Subscriptions" section: 
      1. Add a security definition subscription name to the list in the ICESession.SecurityDefinitionSubscriptions property
      2. Specify SecurityID and CFICode for added security definition subscription as described in the property file comments or in the instruction below
      Codes of ICE markets can be found at: https://www.theice.com/publicdocs/technology/Supported_Market_Types_on_ICE_API.pdf
    3. Specify an appropriate value of the ICESession.SecurityDefinitionSubscriptions.RequestMode property 
      1. If you wish to receive SecurityDefinitions from p.ii only once a day, set ICESession.SecurityDefinitionSubscriptions.RequestMode = OnceADay
      2. If you wish to receive SecurityDefinitions from p.ii at each logon, set ICESession.SecurityDefinitionSubscriptions.RequestMode = EachLogon
    4. Specify a correct path in the ICESession.StorageFileName property.
  2. Make changes to the ‘FIXEdge.properties’ configuration file:
    1. For ‘ICESession’ specify SenderCompID, your ICE Username and Password. By default the parameters are filled with dummy values / not filled
  3. ‘BL_Config.xml’
    1. Make sure that all <History> entities point to the correct DSN, also adjust username and password if they are wrong
    2. Specify correct SenderCompID in the rule "Launch ICE Handler" at the line: <MatchMessage Value=".*PLACE YOUR SENDER COMP ID HERE.*" />
      E.g., if your SenderCompID is 1234, the rule will look like: <MatchMessage Value=".*1234.*" />

...

How to subscribe to the particular ICE market

ICE markets ICE Trade Capture Solution will subscribe to are specified in the ICEProperties.properties configuration file.

In order to subscribe to the particular ICE market, follow the step-by-step instruction below:

  1. Review https://www.theice.com/publicdocs/technology/Supported_Market_Types_on_ICE_API.pdf and find the ICE Market Type ID you are interested in;
  2. Come up with the name for the subscription and specify it in the ICESession.SecurityDefinitionSubscriptions property (it supports several values delimited by comma).
  3. Add subscription details in the following format:
    ICESession.SecurityDefinitionSubscriptions.<Subscription_Name>.SecurityID = ice_market_type_id
    ICESession.SecurityDefinitionSubscriptions.<Subscription_Name>.CFICode = FXXXXX (for Futures) or OXXXXX (for Options) or OXXFXX (for Unique Option market IDs)

Below is the example of the subscription to the Atlantic Coal Futures market type. Market ID is 123. Let's say we are interested in options and the subscription name is ICEAtlanticCoalOptions:

Code Block
languagebash
titleSnippet from ICEProperties.properties
linenumberstrue
ICESession.SecurityDefinitionSubscriptions = ICEAtlanticCoalOptions
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.SecurityID = 123
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.CFICode = OXXXXX

To add a new ICE market, just repeat the steps 1-3 and update the ICEProperties.properties configuration fileLet's say we are interested in Singapore Energy futures (Market ID is 133) and subscription name is the ICESingaporeEnergyFutures:

Code Block
languagebash
titleSnippet from ICEProperties.properties
linenumberstrue
ICESession.SecurityDefinitionSubscriptions = ICEAtlanticCoalOptions, ICESingaporeEnergyFutures
# Atlantic Coal Futures
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.SecurityID = 123
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.CFICode = OXXXXX
# Singapore Energy
ICESession.SecurityDefinitionSubscriptions.ICESingaporeEnergyFutures.SecurityID = 133
ICESession.SecurityDefinitionSubscriptions.ICESingaporeEnergyFutures.CFICode = FXXXXX

How to perform recovery and re-request trades from some period

ICE Trade Capture Solution has inbuilt abilities to restore the trade data missed due to the outage. Basic recovery mechanism is based on the persistence file (ICE_persistStorage.out), where the date & time of the last received trade are preserved with the time accuracy received in the incoming message.

After the session is started, ICE Trade Capture Solution populates tags 75 (TradeDate) and 60 (TransactTime) in the Trade Capture Report Request based on the date & time (see LastTransactTime field) from the persistence file to request the snapshot of trades starting from the time when the latest trade was received.

Note

If the file is absent or empty, ICE Trade Capture Solution will request the snapshot of trades from last 2 days starting from the "current" time (in UTC)Otherwise, data stated in the file will be used.

In order to re-request trades which have already been received earlier, just remove the persistence file (ICE_persistStorage.out) or specify the desired time in a LastTransactTime field (from which the snapshot of trades should be requested) and restart the session. Keep in mind how long ICE keeps trade records when specifying LastTransactTime.

How long does ICE keep trades records

According to ICE Trade Capture specification, ICE holds trade capture data for last 2 business days only.

What is the ICE Trade Capture behavior in case of the ICE session termination

  1. ICE Trade Capture Solution determines that connection with ICE is lost.
  2. ICE Trade Capture Solution considers the Trade Capture Report subscription terminated.
  3. ICE Trade Capture Solution tries to reconnect in accordance with the ReconnectMaxTries and ReconnectInterval session properties specified in the FIXEdge.properties.
  4. Once the connection is back, ICE Trade Capture Solution starts execution of the main flow from:

    1. step 2, if ICESession.SecurityDefinitionSubscriptions.RequestMode = EachLogon is specified in the ICEProperties.properties

    2. step 4, if ICESession.SecurityDefinitionSubscriptions.RequestMode = OnceADay is specified in the ICEProperties.properties

    Note

    Start time in Trade Capture Report Request (MsgType = "AD") will be populated based on the data specified in the persistence file (ICE_persistStorage.out).

What is the ICE session schedule and how to setup it in ICE Trade Capture Solution

According to ICE Trade Capture specification, all FIX sessions in Production will be reset by the ICE FIX host after every 24 hours, i.e. at the beginning of the next trading day (during maintenance window between 6:30 PM to 7:30 PM EST/EDT).

As for Test environment, ICE has daily maintenance times at 6:05 PM to 8:30 PM EST/EDT except for Wednesday when there is an additional maintenance between 1 PM to 3 PM EST/EDT.

ICE regular trading and support hours can be found on the official site

The schedule can be set in ICE Trade Capture Solution by means of FIXEdge Scheduler properties or via FIXICC Scheduler functionality.

  • Below is the example of how the ICE schedule for Production environment can be configured (applicable to FIXEdge 6.0 and higher):

    Code Block
    languagebash
    titleSnippet from FIXEdge.properties
    linenumberstrue
    FIXICC.Schedules = true
    
    # Schedule for PROD ICE environment
    Schedules.ICEFIXSchedule.StartTime = 0 30 19 * * *
    Schedules.ICEFIXSchedule.TerminateTime =  0 30 18 * * *
    Schedules.ICEFIXSchedule.TimeZone = EST5EDT
    
    FixLayer.FixEngine.Session.ICESession.Schedule = ICEFIXSchedule
  • Below is the example on how the ICE schedule for Test environment can be setup (applicable to FIXEdge 6.0 and higher):

    Code Block
    languagebash
    titleSnippet from FIXEdge.properties
    linenumberstrue
    FIXICC.Schedules = true
    
    # Schedule for TEST ICE environment
    Schedules.ICEFIXSchedule.StartTime = 0 30 20 * * *; 0 0 15 * * 4
    Schedules.ICEFIXSchedule.TerminateTime =  0 5 18 * * *; 0 0 13 * * 4
    Schedules.ICEFIXSchedule.TimeZone = EST5EDT
    
    FixLayer.FixEngine.Session.ICESession.Schedule = ICEFIXSchedule
Note

Both schedules are already configured out-of-box. Need just to switch between them when move from Test to Production.

How to make a new field from ICE Trade Capture FIX interface stored in the database

In order to process new fields so that they can appear in the database, the following needs to be done:

...

In order to apply the changes, you will need to restart the FIXEdge.

Example:

Below is the example of how to add the new MiFID II related field to the ICE Trade Capture Solution so that it can be stored in the database.

Assume that tag 9707 (MiFIDID) from the Trade Capture Report message (MsgType = "AE") should be now stored in the database. Following the step-by-step instruction presented above:

...

According to the ICE Trade Capture specification (see https://community.theice.com/docs/DOC-19796), MiFIDID is located in the root of the Trade Capture Report message (MsgType = "AE").
Then the ICEReports history from the BL_Config file should be adjusted. Adding the new field to the ICEReports history:

Code Block
languagexml
titleSnippet from BL_Config
<History Name="ICEReports"
	StorageType="ODBC"
	MaxNumberOfRecords="15000"
	TableName="ICEReports"
	ColumnSize="256"
	ConnectionString="DSN=ICE_Trades;UID=ice_admin;Pwd=temp_pass;">
<KeyField ColumnName="TradeReportID" ColumnSize="256">571</KeyField>
..........
<Field ColumnName="MiFIDID" ColumnSize="256">9707</Field>
<Field ColumnName="ClientAppType" ColumnSize="256">9413</Field>
</History>

...

Add the processing of the new 9707 field to the ICETrdCapt.js:

Code Block
languagejs
titleSnippet from ICETrdCapt.js
..........
rootData = new Array();
rootTags = new Array(487,856,828,150,17,39,570,55,48,22,461,9403,202,916,917,32,31,75,60,9018,9022,552,555,1126,207,820,9820,9520,9521,9522,9523,9524,9525,9064,762,9510,...,9707/*,in code 9413*/);
..........

...

Table of Contents

Is B2BITS ICE Trade Capture Solution certified by ICE

Yes, B2BITS ICE Trade Capture Solution is a certified software. You can find us among ICE Trade Capture Vendors listed on the ICE website - https://www.theice.com/connectivity/trade-capture-vendors.

How to deploy the package and make it work

Follow the step-by-step instruction below:

  1. Install FIXEdge using these instructions: https://kb.b2bits.com/display/B2BITS/FIXEdge+Installation+Guide

  2. Create a database for ICE trades storing:
    1. Create a database itself. ‘ICE_Trades’ is suggested as the default name.

      Note

      Make sure that the parameter Server authentication of the SQL Server Database Engine is set to SQL Server and Windows Authentication mode.
      Change it, if necessary. For more information please refer to SQL Server technical manual.

    2. Create user login, database user and database tables using the ‘ICE_database.sql’ script – adjust it if necessary (database name, user, etc)
    3. Execute 'MSSQL_ICETrdCapt.sql', and 'MSSQL_ICESecDef.sql' scripts against the database to create stored procedures (adjust change the database name if necessary
    4. Add ODBC data source for the database on the server with installed FIXEdge

  3. Adjust FIXEdge configuration (typically located here ‘C:/B2BITS/FIXEdge/FIXEdge1/conf/’)
    1. ICE Handler property file (ICEProperties.properties)
      1.  Specify SenderCompID for:
        1.  The ICESession property so that its final format is: SenderCompID[SOH]TargetCompID
        2. The ICESession.SenderCompID property
      2. Add security definitions subscriptions to the necessary markets using provided examples in the "Security Definition Subscriptions" section: 
        1. Add a security definition subscription name to the list in the ICESession.SecurityDefinitionSubscriptions property
        2. Specify SecurityID and CFICode for added security definition subscription as described in the property file comments or in the instruction below
        Codes of ICE markets can be found at: https://www.theice.com/publicdocs/technology/Supported_Market_Types_on_ICE_API.pdf
      3. Specify an appropriate value of the ICESession.SecurityDefinitionSubscriptions.RequestMode property 
        1. If you wish to receive SecurityDefinitions from p.ii only once a day, set ICESession.SecurityDefinitionSubscriptions.RequestMode = OnceADay
        2. If you wish to receive SecurityDefinitions from p.ii at each logon, set ICESession.SecurityDefinitionSubscriptions.RequestMode = EachLogon
      4. Specify a correct path in the ICESession.StorageFileName property.
    2. Make changes to the ‘FIXEdge.properties’ configuration file:
      1. For ‘ICESession’ specify SenderCompID, your ICE Username and Password. By default the parameters are filled with dummy values / not filled
    3. ‘BL_Config.xml’
      1. Make sure that all <History> entities point to the correct DSN, also adjust username and password if they are different from default ones
      2. Specify correct SenderCompID in the rule "Launch ICE Handler" at the line: <MatchMessage Value=".*PLACE YOUR SENDER COMP ID HERE.*" />
        E.g., if your SenderCompID is 1234, the rule will look like: <MatchMessage Value=".*1234.*" />

  4. Start FIXEdge via FIX Integrated Control Center (FIXICC)

How to subscribe to the particular ICE market

ICE markets ICE Trade Capture Solution will subscribe to are specified in the ICEProperties.properties configuration file.

In order to subscribe to the particular ICE market, follow the step-by-step instruction below:

  1. Review https://www.theice.com/publicdocs/technology/Supported_Market_Types_on_ICE_API.pdf and find the ICE Market Type ID you are interested in;
  2. Come up with the name for the subscription and specify it in the ICESession.SecurityDefinitionSubscriptions property (it supports several values delimited by comma).
  3. Add subscription details in the following format:
    ICESession.SecurityDefinitionSubscriptions.<Subscription_Name>.SecurityID = ice_market_type_id
    ICESession.SecurityDefinitionSubscriptions.<Subscription_Name>.CFICode = FXXXXX (for Futures) or OXXXXX (for Options) or OXXFXX (for Unique Option market IDs)

Below is the example of the subscription to the Atlantic Coal Futures market type. Market ID is 123. Let's say we are interested in options and the subscription name is ICEAtlanticCoalOptions:

Code Block
languagebash
titleSnippet from ICEProperties.properties
linenumberstrue
ICESession.SecurityDefinitionSubscriptions = ICEAtlanticCoalOptions
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.SecurityID = 123
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.CFICode = OXXXXX

To add a new ICE market, just repeat the steps 1-3 and update the ICEProperties.properties configuration fileLet's say we are interested in Singapore Energy futures (Market ID is 133) and subscription name is the ICESingaporeEnergyFutures:

Code Block
languagebash
titleSnippet from ICEProperties.properties
linenumberstrue
ICESession.SecurityDefinitionSubscriptions = ICEAtlanticCoalOptions, ICESingaporeEnergyFutures
# Atlantic Coal Futures
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.SecurityID = 123
ICESession.SecurityDefinitionSubscriptions.ICEAtlanticCoalOptions.CFICode = OXXXXX
# Singapore Energy
ICESession.SecurityDefinitionSubscriptions.ICESingaporeEnergyFutures.SecurityID = 133
ICESession.SecurityDefinitionSubscriptions.ICESingaporeEnergyFutures.CFICode = FXXXXX

How to perform recovery and re-request trades from some period

ICE Trade Capture Solution has inbuilt abilities to restore the trade data missed due to the outage. Basic recovery mechanism is based on the persistence file (ICE_persistStorage.out), where the date & time of the last received trade are preserved with the time accuracy received in the incoming message.

After the session is started, ICE Trade Capture Solution populates tags 75 (TradeDate) and 60 (TransactTime) in the Trade Capture Report Request based on the date & time (see LastTransactTime field) from the persistence file to request the snapshot of trades starting from the time when the latest trade was received.

Note

If the file is absent or empty, ICE Trade Capture Solution will request the snapshot of trades from last 2 days starting from the "current" time (in UTC)Otherwise, data stated in the file will be used.

In order to re-request trades which have already been received earlier, just remove the persistence file (ICE_persistStorage.out) or specify the desired time in a LastTransactTime field (from which the snapshot of trades should be requested) and restart the session. Keep in mind how long ICE keeps trade records when specifying LastTransactTime.

How long does ICE keep trades records

According to ICE Trade Capture specification, ICE holds trade capture data for last 2 business days only.

What is the ICE Trade Capture behavior in case of the ICE session termination

  1. ICE Trade Capture Solution determines that connection with ICE is lost.
  2. ICE Trade Capture Solution considers the Trade Capture Report subscription terminated.
  3. ICE Trade Capture Solution tries to reconnect in accordance with the ReconnectMaxTries and ReconnectInterval session properties specified in the FIXEdge.properties.
  4. Once the connection is back, ICE Trade Capture Solution starts execution of the main flow from:

    1. step 2, if ICESession.SecurityDefinitionSubscriptions.RequestMode = EachLogon is specified in the ICEProperties.properties

    2. step 4, if ICESession.SecurityDefinitionSubscriptions.RequestMode = OnceADay is specified in the ICEProperties.properties

    Note

    Start time in Trade Capture Report Request (MsgType = "AD") will be populated based on the data specified in the persistence file (ICE_persistStorage.out).

What is the ICE session schedule and how to setup it in ICE Trade Capture Solution

According to ICE Trade Capture specification, all FIX sessions in Production will be reset by the ICE FIX host after every 24 hours, i.e. at the beginning of the next trading day (during maintenance window between 6:30 PM to 7:30 PM EST/EDT).

As for Test environment, ICE has daily maintenance times at 6:05 PM to 8:30 PM EST/EDT except for Wednesday when there is an additional maintenance between 1 PM to 3 PM EST/EDT.

ICE regular trading and support hours can be found on the official site

The schedule can be set in ICE Trade Capture Solution by means of FIXEdge Scheduler properties or via FIXICC Scheduler functionality.

  • Below is the example of how the ICE schedule for Production environment can be configured (applicable to FIXEdge 6.0 and higher):

    Code Block
    languagebash
    titleSnippet from FIXEdge.properties
    linenumberstrue
    FIXICC.Schedules = true
    
    # Schedule for PROD ICE environment
    Schedules.ICEFIXSchedule.StartTime = 0 30 19 * * *
    Schedules.ICEFIXSchedule.TerminateTime =  0 30 18 * * *
    Schedules.ICEFIXSchedule.TimeZone = EST5EDT
    
    FixLayer.FixEngine.Session.ICESession.Schedule = ICEFIXSchedule
  • Below is the example on how the ICE schedule for Test environment can be setup (applicable to FIXEdge 6.0 and higher):

    Code Block
    languagebash
    titleSnippet from FIXEdge.properties
    linenumberstrue
    FIXICC.Schedules = true
    
    # Schedule for TEST ICE environment
    Schedules.ICEFIXSchedule.StartTime = 0 30 20 * * *; 0 0 15 * * 4
    Schedules.ICEFIXSchedule.TerminateTime =  0 5 18 * * *; 0 0 13 * * 4
    Schedules.ICEFIXSchedule.TimeZone = EST5EDT
    
    FixLayer.FixEngine.Session.ICESession.Schedule = ICEFIXSchedule
Note

Both schedules are already configured out-of-box. Need just to switch between them when move from Test to Production.


How to make a new field from ICE Trade Capture FIX interface stored in the database

Download process is free from any FIXEdge specifics. Any changes can be done by modifying the proper stored procedure and data model.

In order to process new fields so that they can appear in the database, the following needs to be done:

  1. Check where the FIX tag you are interested in is located in the FIX message. Note that tags from repeating groups are allocated in the separate tables. Check ICE Trade Capture to Database for details.
    1. If the FIX tag is located in the root of the message (either Trade Capture Report or Security Definition), then add the coincident column to the ICEReports / ICESecurityDefinitions table
    2. If the FIX tag is located in one of the repeating groups which are already stored in the database, then add column to the corresponding table
    3. If the FIX tag is located in one of the repeating groups which are not stored in the database, then add a new table for the group and specify the required field there

  2. Add support for new fields in stored procedure (either SaveReports or SaveDefinitions depending on which fields you are going to add).

FIXEdge server restart is not required.

Example (for MS SQL Server):

Below is the example of how to add the new MiFID II related field to the ICE Trade Capture Solution so that it can be stored in the database.

Assume that tag 9707 (MiFIDID) from the Trade Capture Report message (MsgType = "AE") should be now stored in the database. Following the step-by-step instruction presented above:

  1. According to the ICE Trade Capture specification (see https://community.theice.com/docs/DOC-19796), MiFIDID is located in the root of the Trade Capture Report message (MsgType = "AE"). Add the new MiFIDID column with varchar (256) type to the ICEReports table.

    Code Block
    languagesql
    titleICEReports
    ALTER TABLE [ICEReports] ADD [MiFIDID] [varchar](256) NULL
  2. Then the SaveReports stored procedure should be adjusted:

    Code Block
    languagesql
    titleSaveReports
     INSERT INTO [ICEReports]
     (
      TradeReportID,
      SendingTime,
      .....  
      ClientIDCode,
      MiFIDID,                               -- new MiFIDID tag 
      ClientAppType
     )
     SELECT
      @ReportID,
      @SendingTime,
      .....
      C.value('f9706[1]', 'nvarchar(256)'),
      C.value('f9707[1]', 'nvarchar(256)'), -- new MiFIDID tag 
      @ClientAppType
     FROM @xmlData.nodes('/FIXMessage') as T(C)
     OPTION (OPTIMIZE FOR ( @xmlData = NULL ));


How to move ICE Trade Capture configuration from Test to Production

...