Order Connection Messages


New Order Single <D>

The New Order Single message requests an order be placed.

The Execution Report reply will provide information on the result of the order request, or give the reason for its rejection.

Tag Field Name Required Type / Value Description
standard headers Y MsgType=D
11 ClOrdID Y string unique order identifier assigned by the client
1 Account Y numeric the OANDA fxTrade practice or live account number the order is booked to
21 HandlInst Y (FIX.4.2, FIX.4.3), N (FIX.4.4) “1” instructions for order handling:
  • 1 = automated, private, no intervention
  • 110 MinQty N qty minimum quantity required for execution; only valid for TimeInForce = 3 or 4
    55 Symbol Y string currency pair
    54 Side Y char
  • 1 = buy
  • 2 = sell
  • 60 TransactTime Y UTC timestamp time of new order request; the timestamp is used to determine if the request is potentially stale
    38 OrderQty Y qty number of units ordered - value must be integer
    40 OrdType Y char order type:
  • 1 = market
  • 2 = limit
  • 3 = stop
  • J = market-if-touched (FIX.4.3+ only)
  • 44 Price Y for limit and market-if-touched orders only price limit or market-if-touched trigger price
    99 StopPx Y for stop orders only price stop price
    59 TimeInForce N char see below
    432 ExpireDate one of ExpireDate / ExpireTime is required when TimeInForce=6 LocalMktDate for GTD orders, requests expiry at 5pm Eastern (EST or EDT) on local market date indicated
    126 ExpireTime UTC timestamp for GTD orders, requests expiry at exact timestamp indicated
    standard trailer Y

    The order type determines what TimeInForce values are supported:

    • market order

      • no value specified - requests standard market order
      • FOK - fill-or-kill market order
      • IOC - immediate-or-cancel market order
    • limit order, stop order

      • no value specified - requests DAY expiry
      • DAY - expires at 5pm Eastern time subject to submission before 4:55pm
      • GTD - expires at indicated ExpireDate or ExpireTime
      • FOK - fill-or-kill
      • IOC - immediate-or-cancel
    • market-if-touched order

      • no value specified - requests DAY expiry
      • DAY - expires at 5pm Eastern time subject to submission before 4:55pm
      • GTD - expires at indicated ExpireDate or ExpireTime

    Order Cancel Request <F>

    The Order Cancel Request requests cancellation of an order.

    The cancel request will only be accepted (and execution report returned) if the order hasn’t already been executed and can be cancelled successfully; otherwise an order cancel reject is returned.

    The OANDA server supports full cancellations only; any OrderQty provided is ignored. To reduce the quantity of an order use the Order Cancel / Replace Request instead.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=F
    37 OrderID N string unique id for order assigned by OANDA; used to identify order if provided
    41 OrigClOrdID Y string identifies order to cancel in this request
    11 ClOrdID Y string new unique order identifier assigned by the client, if request is successful
    1 Account Y numeric the OANDA fxTrade practice or live account number the order is booked to
    55 Symbol Y string existing currency pair
    54 Side Y char existing side
    60 TransactTime Y UTC timestamp time of order cancel request; the timestamp is used to determine if the request is potentially stale
    standard trailer Y

    The OrigClOrdID, Symbol, and Side must always match the existing order. If an OrderID is provided it is used to uniquely identify the order; this is required if the OrigClOrdID does not uniquely identify the order (i.e., duplicate ClOrdID values were used).

    If the request is successful the order is identified by the new ClOrdID, otherwise the OrigClOrdID remains the order ClOrdID.

    Order Cancel / Replace Request <G>

    The Order Cancel / Replace Request (sometimes called a modify request) is used to change the parameters of an existing order.

    This request can be used to change the price, stop price, order expiry time, and order quantity for existing limit, stop, and market-if-touched orders with expiry time remaining.

    Market orders and limit/stop orders requested FOK or IOC execute immediately on reception and cannot be canceled or replaced.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=F
    37 OrderID N string unique id for order assigned by OANDA; used to identify order if provided
    41 OrigClOrdID Y string identifies order to cancel in this request
    11 ClOrdID Y string new unique order identifier assigned by the client, if request is successful
    1 Account Y numeric the OANDA fxTrade practice or live account number the order is booked to
    21 HandlInst Y (FIX.4.2, FIX.4.3), N (FIX.4.4) “1” instructions for order handling:
  • 1 = automated, private, no intervention
  • 55 Symbol Y string currency pair
    54 Side Y char
  • 1 = buy
  • 2 = sell
  • 60 TransactTime Y UTC timestamp time of new order request; the timestamp is used to determine if the request is potentially stale
    38 OrderQty Y qty number of units ordered - value must be integer
    40 OrdType Y char order type:
  • 1 = market
  • 2 = limit
  • 3 = stop
  • J = market-if-touched (FIX.4.3+ only)
  • 44 Price Y for limit and market-if-touched orders only price limit or market-if-touched trigger price
    99 StopPx Y for stop orders only price stop price
    59 TimeInForce N char see below
    432 ExpireDate one of ExpireDate / ExpireTime is required when TimeInForce=6 LocalMktDate for GTD orders, requests expiry at 5pm Eastern (EST or EDT) on local market date indicated
    126 ExpireTime UTC timestamp for GTD orders, requests expiry at exact timestamp indicated
    standard trailer Y

    The OrigClOrdID, Symbol, and Side must always match the existing order. If an OrderID is provided it is used to uniquely identify the order; this is required if the OrigClOrdID does not uniquely identify the order (i.e., duplicate ClOrdID values were used).

    If the request is successful the order is identified by the new ClOrdID, otherwise the OrigClOrdID remains the order ClOrdID.

    Order Status Request <H>

    Information on previous orders is available via the Order Status Request. An Execution Report supplies the information.

    Status information is guaranteed to be available for at least one month after order completion (fill, expiry, cancellation).

    No information is recorded for OrdStatus=REJECTED orders.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=H
    37 OrderID N string unique id for order assigned by OANDA; used to identify order if provided
    11 ClOrdID Y string unique order identifier assigned by the client
    790 OrdStatusReqID N (non-standard prior to FIX.4.4) string if provided, is echoed back in Execution Report
    55 Symbol Y string currency pair
    54 Side Y char
  • 1 = buy
  • 2 = sell
  • standard trailer Y

    The ClOrdID, Symbol, and Side must always match the existing order. If an OrderID is provided it is used to uniquely identify the order; this is required if the ClOrdID does not uniquely identify the order (i.e., duplicate ClOrdID values were used).

    The OANDA server supports OrdStatusReqID in FIX.4.2 and FIX.4.3 connections; the client engine must be prepared to accept the tag in the Execution Report if one was provided in an Order Status Request.

    Execution Report <8>

    The Execution Report communicates the result of an order submission, change, or cancellation. Specifically, this message:

    • confirms acceptance or rejection of a new order
    • confirms acceptance of changes to existing order

    Rejected order cancel and cancel/replace requests are communicated via Order Cancel Reject.

    Note that the format of an Execution Report message varies by FIX version. In FIX.4.2, each execution report contains three fields that are used to communicate both the current state of the order and the purpose of the message: OrdStatus <39>, ExecType <150> and ExecTransType <20>. In FIX.4.3+, each execution report contains two fields that are used to communicate both the current state of the order (OrdStatus <39>) and the purpose of the message (ExecType <150>).

    In execution reports, the TimeInForce <59> tag that is reported for a long-duration order will be reported as DAY in response to a request where TimeInForce=DAY was specified. In general, order expiry times will be reported using TimeInForce=GTD with the exact UTC expiry time reported via ExpireTime <126>.

    The Text <58> field provides supplemental information about the order execution. It consists of phrases or sentences separated with a period and space. Execution reports also list the OANDA transaction IDs (transaction tickets) that correspond to the FIX order.

    An Execution Report for a market-if-touched order appearing on a FIX.4.2 connection will be reported as OrdType <40> = 2 with a Text <58> annotation “OrdType=J”.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=8
    37 OrderID N string unique id for order assigned by OANDA
    11 ClOrdID Y string unique order identifier assigned by the client
    41 OrigClOrdID N string previous order identifier assigned by the client for order cancel and cancel/replace request responses
    790 OrdStatusReqID N (non-standard prior to FIX.4.4) string provided if present in requesting Order Status Request value from request echoed back
    17 ExecID Y string execution ID assigned by OANDA server
    20 ExecTransType (FIX.4.2 only) Y string identifies transaction type
    150 ExecType Y char describes specific execution report
    39 OrdStatus Y char identifies the current order status
    103 OrdRejReason N int code to identify order rejection reason
    1 Account Y numeric the OANDA fxTrade practice or live account number the order is booked to
    55 Symbol Y string currency pair
    461 CFICode (FIX.4.4 only) N string ISO 10962 compliant CFI code; value: MRCXXX
    54 Side Y char
  • 1 = buy
  • 2 = sell
  • 38 OrderQty Y qty number of units ordered - integer value
    40 OrdType Y char order type:
  • 1 = market
  • 2 = limit
  • 3 = stop
  • J = market-if-touched (FIX.4.3+ only)
  • 44 Price Y for limit and market-if-touched orders only price limit or market-if-touched trigger price
    99 StopPx Y for stop orders only price stop price
    59 TimeInForce Y char
    432 ExpireDate one of ExpireDate / ExpireTime is required when TimeInForce=6 LocalMktDate for GTD orders, requests expiry at 5pm Eastern (EST or EDT) on local market date indicated
    126 ExpireTime UTC timestamp for GTD orders, requests expiry at exact timestamp indicated
    32 LastShares (FIX.4.2) / LastQty (FIX.4.3+) N qty units transacted on the most recent fill
    31 LastPx N price price of the most recent fill
    151 LeavesQty Y qty amount open for futher execution
    If the OrdStatus is CANCELED, EXPIRED, or REJECTED, LeavesQty is reported as 0 (i.e., no further qty for execution)
    14 CumQty Y qty total number of units filled on this order
    6 AvgPx Y price average price of all fills on this order
    60 TransactTime Y UTC timestamp time the transaction represented by this execution report occurred
    21 HandlInst Y (FIX.4.2, FIX.4.3), N (FIX.4.4) “1” instructions for order handling:
  • 1 = automated, private, no intervention
  • 110 MinQty N qty minimum quantity required for execution; only valid for TimeInForce = 3 or 4
    58 Text N string optional explanatory text
    standard trailer Y

    Order Cancel Reject <9>

    The Order Cancel Reject message is issued in response to cancel and cancel/replace requests which cannot be honored.

    The ClOrdID for the order retains its original value as the cancel or cancel/replace did not occur.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=9
    37 OrderID N string unique id for order assigned by OANDA
    11 ClOrdID Y string unique order identifier assigned by the client
    41 OrigClOrdID Y string identifies order that could not be canceled/replaced
    39 OrdStatus Y char identifies the current order status
    1 Account Y numeric the OANDA fxTrade practice or live account number the order is booked to
    434 CxlRejResponseTo Y char indicates the request this reject is in response to:
  • 1 = order cancel request
  • 2 = order cancel / replace request
  • 102 CxlRejReason N int identifies reason for rejection
    58 Text N string optional explanatory text
    standard trailer Y