Order File Format

The order file format is as follows:
Command, Account, Symbol, Exchange, Action, Quantity, OrderType, Stop, Limit, TimeInForce, OrderId, OcaGroup, SystemName
FieldValue exampleRequired
CommandPlace, Cancel, Change, Cancel All, Close AllY
AccountU52363Y
SymbolES 12-04Y
ExchangeECBOTY
ActionBuy, Sell, Sell Short, Buy to CoverY
Quantity1Y
Order TypeMarket, Stop, Limit, Stop LimitY
Stop1000Y
Limit1010Y
Time in ForceDay, GTCY
OrderIdTB12345N
OCA GroupGroup 1N
System NameES System 1N

General

  1. All fields except OCA Group and System Nameare not case-sensitive and will be capitalized by TradeBullet;
  2. Spaces are important for Command, Action and Order Type: Cancel All is valid, CancelAll is not;
  3. Orders must be in plain text, HTML or Rich Text formatted emails will be rejected;
  4. Text must be US-EN formatted (e.g. 100.02 is good, 100,02 is bad);
  5. Blank lines will be ignored;
  6. There can be an unlimited number of orders in each file or email;
  7. There must be nothing else than the orders in the file or email: every line will be parsed so make sure there is no "Love you" message from your spouse in there! Beware of free web mail accounts that often include promotional text in the email footer;
  8. If you set a Email Order Password, it must be in the subject line;

Commands

1. Change

To Change a open order (also called Replace), you must supply theOrderId of the existing order, and only Quantity,Stop, Limit and System Name can be changed.

The Order Type cannot be changed (e.g. a Market order cannot become a Stop order).

Example:

Existing order:OrderId #TB12345 to Buy 1000 MSFT on Default at Market Day for account U1234
Desired order: Buy 900 MSFT on Default at Market for account U1234
Order file text: Change, U1234, MSFT, Default, Buy, 900, Market,,, Day, TB12345

2. Cancel

The only fields necessary are Command, Account and OrderId.All other fields can be omitted.

Example:

Existing order: Open order #TB12345 to Buy 10 ES 03-05 on ECBOT at 1000 Limit GTC for account U1234.
Order file text: Cancel,U1234,,,,,,,,,TB12345

3. Cancel All

Cancel All cancels all open orders for the account. The only fields necessary are Command and Account.All other fields can be omitted.

Example to cancel all open orders:

Order file text: Cancel All,U1234 or Cancel All,U1234,,,,,,,,,

4. Close All

Close All closes (flattens) all open positions for the account.The only fields necessary are Command and Account.All other fields can be omitted.

Example to close all open positions:

Order file text: Close All,U1234 or Close All,U1234,,,,,,,,,

Topics: