Audit Convert Tool
Binary Format and Audit File Conversion
The Order Server creates the audit file using a raw binary format. Before you can read this file or before submitting it to the exchange or a third-party, you must convert it into a *.csv file. To convert the audit file into a readable copy, use the audit_convert.exe program. You can use this program to either convert all audit files in a specified directory or to convert a single audit file. The program creates readable audit files named exchange-flavor_YYYY-MM-DD.csv in the same location as the audit file being converted.
Older versions of the Audit Convert program require that the tool and the audit file must use the same version.
You must use the most recent version of the tool to convert audit files of different versions.
File Conversion on X_TRADER ASP TT Gateways
X_TRADER ASP TT Gateways 7.17 support identifying each broker (e.g., FCM, trading firm, etc.) in the gateway audit files. The Audit Convert Tool version 7.17.0 on X_TRADER ASP gateways produces separate *.csv files per broker instead of combining data for all brokers into a single *.csv file named: exchange-flavor_BrokerName_YYYY-MM-DD.csv. For Audit Convert Tool options specific to X_TRADER ASP, refer to Additional Command Line Parameters.
For TT Gateways 7.17 and higher, the older version of the audit convert tool program is renamed audit_convert_7_16.exe (version 7.16.0) and is incompatible with newer file versions. Both versions of the tool are available on X_TRADER ASP TT Gateways.
Running the Conversion
You may use the Audit Convert tool to either convert a single file or multiple files at the same time using one of the following procedures.
To convert a single audit file:
- Open a Command window.
- Type: audit_convert.exeabsolutefilename
Where absolutefilename is the path and filename of the audit file you want to convert. By default, audit_convert.exe places the resulting *.csv file in the same location as the audit file being converted.
Example Single Audit File:
- To close the Console window, type Exit.
To convert multiple audit files:
- Open a Command window.
- Type: audit_convert.exedirectoryexchange-flavor
- directory is the location of your audit files.
- exchange-flavor is the name of the TT Gateway that produced the audit files. This is an optional parameter. If you don't specify the exchange-flavor, all *.cba files in the directory will be converted. The audit_convert.exe program places the resulting *.csv files in the same location as the audit files being converted.
Example Multiple Audit Files on a TT CME-A Gateway:
audit_convert.exe c:ttauditfiles CME-A
Note: When converting multiple files, you must not include a back slash () between the directory and the exchange-flavor.
- To close the Console window, type Exit.
Additional Command Line Parameters
You may use the following parameters to alter the behavior of the Audit Convert Tool.
Suppressing column names
You can use the command line to omit column names during conversion by using the /NO “Column” command where “Column” equals the particular column field.
Example /NO "Column"
audit_convert.exe C:ttauditfiles CME-A /NO “FFT2”, /NO “FFT3”
This command converts all audit files for the TT CME-A Gateway while omitting the column names of the FFT2 and FFT3 fields.
To accurately convert and open larger Audit Files, you may use the /ROWS command line parameter to split audit files into several smaller *.csv files. This feature is available with the Audit Convert Tool Version 7.7.1 and higher which is included with all TT Gateways beginning with Version 7.15.
When adding this command, follow the /ROWS parameter with the maximum number of rows for each file as shown in the example below:
audit_convert.exe C:ttauditfilesCME-A_2012-11-15.cba /ROWS 200
The command above creates a new *.csv file for every 200 rows in the original Audit File.
X_TRADER ASP Options
The Audit Convert Tool 7.17.0 automatically zips the latest day’s files in csv format and places them in the <root drive>:ttarchday folder. Optionally, you can use the /Archive <archive path> parameter to determine the location of the zip file and archive folder.
When it runs with this parameter, the Audit Convert Tool creates one zip file per broker named ExchageName_BrokerName_yyyy-mm_dd.zip with only the latest day’s audit files, places it in the specified archive folder location, and deletes any previous zip files. TT Clean also deletes all files (*.cba and *.csv) in the ttauditfiles directory that are more than ten days old.
Example /Archive <archive path>
audit_convert.exe C:ttauditfilesCME-A_2012-11-29.cba /Archive C:ttauditfilesarchive_folder
By default, the Audit Convert Tool 7.17.0 creates audit files based on the calendar date; the new file is created at midnight local time as configured on the gateway machine. If the optional /Clearing parameter is used, the Audit Convert Tool creates audit files based on the clearing date (if provided by the exchange) as specified on each fill. The tool creates the same file name for both clearing and calendar date files, so specify different directories if you create both files.
The Order Server writes the clearing date to the audit file if it receives a clearing date message from the exchange. Currently, only OM gateways support this feature.
audit_convert.exe C:ttauditfilesCME-A_2012-11-29.cba /Clearing
Creating Separate Audit Files per Exchange Credential or Broker
The Audit Convert Tool 7.17.0 can split an audit file into separate *.csv files per broker/company or exchange credential (e.g., Member ID) using the/Name <option> parameter. All sessions associated with each broker or exchange membership are included in each *.csv file.
The tool creates each file with the following naming convention depending on which option is used: ExchageName_<MGT|Broker|Company>_yyyy-mm_dd.csv (e.g., CME-S_K30004_2013_08_16). The/Name <option> parameter can be used in X_TRADER ASP and non-X_TRADER ASP trading environments.
|Member||Creates separate csv files for each Exchange Member trading on the gateway.|
|MemberGroup||Creates separate csv files for each member and group that a member belongs to.|
|MemberGroupTrader||Creates separate csv files for each trader associated with a member and group trading on the gateway.|
|Broker||Creates separate csv files for each broker trading on the gateway.|
|Company||Creates separate csv files for each broker company.|
|All||Creates one file for all brokers and companies (X_TRADER ASP) as well as MGTs (both X_TRADER ASP and non-X_TRADER ASP) trading on the gateway.|
The following example shows creating an audit file for all Members trading on a CME-A Gateway.
audit_convert.exe C:ttauditfilesCME-A_2013-08-29.cba /Name Member
In this example, if there are three Exchange Members trading on the CME-A Gateway, the above command creates three separate Excel files in the <Root>:ttauditfiles directory: CME-A_K30004*, CME-A_S13000*, CME-A_ABC123*.
Each session in the *.csv file is identified by the Member ID (one session per Member for CME). For TT Gateways that support multiple sessions per Exchange Member, all session IDs for that membership are included in each Member’s *.csv file.