OrderLoader Guide

The OrderLoader takes in a CSV file of orders and sends them to the ORS. The input to OrderLoader is data-driven - the header line of the data file specifies the FIX fields that are entered for each order.

The column names are configurable and correspond to FIX fields taken from the Quickfix/J javadoc specification. The corresponding values for each field are taken from each individual FIX field. For example, for the Time in Force the name of the corresponding fix field is TimeInForce and the values can be found in the TimeInForce javadoc, as shown in the example below.

OrderLoader allows you to specify custom fields as well as all the supported FIX fields.
Additional configuration options can be specified in the conf/orderloader.xml configuration file.

Side Abbreviations

In the interest of brevity, we have provided additional abbreviations for the values in the Side column. Just like the grammar in the Photon command-line, the OrderLoader accepts the following shortcuts for the Side field:

AbbreviationMeaning
BBuy
SSell
SSSell Short
SSESell Short Exempt

Market Orders

To specify a market order, use the special token, MKT, in the Price field.

Comments

It is possible to comment lines using the # character as the first character on the line:

Symbol,Side,OrderQty,Price,TimeInForce,Account
IBM,B,100,12.1,DAY,123-ASDF-234
# skip this line
EFA,SSE,100,MKT,FILL_OR_KILL,9182379812

Lines commented this way will be ignored by the OrderLoader

Time in Force

The TimeInForce field expects one of the following values, taken from the TimeInForce javadoc:

  • DAY
  • GOOD_TILL_CANCEL
  • AT_THE_OPENING
  • IMMEDIATE_OR_CANCEL
  • FILL_OR_KILL
  • GOOD_TILL_CROSSING
  • GOOD_TILL_DATE
  • AT_THE_CLOSE

Invoking the OrderLoader

To invoke the OrderLoader you need to supply the <orderIdBase> (currently ignored since there is no database storage for orders) and the location of the input CSV file:

$ runOrderLoader.sh 
Usage: java OrderLoader <CSV input file>
Example file format should be: Symbol,Side,OrderQty,Price,TimeInForce,Account
$ runOrderLoader.sh sample/smallMarket.csv

By default, OrderLoader looks for a orderloader.xml file specified in the classpath. There's a copy of it in the conf/ directory of the downloaded distribution. OrderLoader is configured to connect to an ORS on localhost, so modify the configuration file if your ORS lives somewhere else.

Custom Fields

It is possible to specify custom fields in the data file that are not present in the FIX specification.
For example, perhaps your custom FIX implementation needs to have fields 10001 and 10002 specified in all outgoing FIX messages. To do that, just create two more columns in the first line (header) of the CSV file and provide your custom values for each row:

Symbol,Side,OrderQty,Price,TimeInForce,Account,10001,10002
IBM,B,100,12.1,DAY,account-1,custom1-A,custom2-B
GOOG,S,100,453.32,DAY,account-3,custom1-Z,custom2-BD

Required Fields

According to the FIX Specification the New Order requires the following fields, some of which are set in the OrderLoader by default:

Field NameOrderLoader DefaultCan be modified
ClOrdId Set by OrderLoaderno
HandlInstManualyes
Symbolmust be set in data fileyes
Sidemust be set in data fileyes
OrdTypeLIMITyes

All of these except for the ClOrdId can be specified in the data file as well.