Try TT Now

FIX Adapter Reference

Non-persistent FIX order sessions: using Tag 11 (ClOrdId) and Tag 37 (OrderId)

Overview

Because the TT methodology for tags 11 (ClOrdID), 41 (OrigClOrdID), and 37 (OrderID) deviates from the FIX specification, you should use them carefully. For non-persistent sessions, TT FIX Adapter erases all Tag 11 (ClOrdID)s associated with the session from TT FIX Adapter's memory when a session disconnects from TT FIX Adapter, so FIX clients must use Tag 37 (OrderID) in all subsequent Order Cancel Request (F) and Order Cancel Replace Request (G) requests.

Scenario 1: changing an order

The following illustrates how a FIX client and a TT FIX Adapter exchange messages when changing an order in normal operating conditions.

  1. Send a new order - FIX client sends New Order Single (D) message with:

    ClOrdId(11)=TempClOrdId

    OrdId(37)=<not sent>

  2. Order is accepted - TT FIX Adapter sends an Execution Report (8) with:

    ExecTransType(20)=0

    ExecType(150)=0

    ClOrdId(11)=TempClOrdId

    OrdId(37)=TTOrderId

    OrigClOrdId(41)=<not sent>

  3. Send a cancel/replace - FIX client sends Order Cancel Replace Request (G) message with:

    ClOrdId(11)=TempClOrdId2

    OrdId(37)=TTOrderId

    OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is accepted, TT FIX Adapter sends an Execution Report (8) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is rejected by TT FIX Adapter, TT FIX Adapter sends an Order Cancel Reject (9) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is rejected by TT Gateway or exchange, TT FIX Adapter sends an Order Cancel Reject (9) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=TempClOrdId

Scenario 2: modifying an order after a lost connection

The following illustrates how a FIX client and a TT FIX Adapter exchange messages after their connection is interrupted.

  1. Send a new order - FIX client sends New Order Single (D) message with:

    ClOrdId(11)=TempClOrdId

    OrdId(37)=<not sent>

  2. Order is accepted - TT FIX Adapter sends an Execution Report (8) with:

    ExecTransType(20)=0

    ExecType(150)=0

    ClOrdId(11)=TempClOrdId

    OrdId(37)=TTOrderId

    OrigClOrdId(41)=<not sent>

  3. The connection between TT FIX Adapter and client is lost. At this point, all Tag 11 (ClOrdID) information that was associated with orders is lost because non-persistent sessions automatically reset client order IDs after a reset. However, clients can still use Tag 37 (OrderID) to manipulate orders.
  4. After reconnecting, send a cancel/replace - FIX client sends Order Cancel Replace Request (G) message with:

    ClOrdId(11)=TempClOrdId2

    OrdId(37)=TTOrderId

    OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is accepted, TT FIX Adapter sends an Execution Report (8) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is rejected by TT FIX Adapter, TT FIX Adapter sends an Order Cancel Reject (9) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=<not sent>

    • If Cancel/Replace is rejected by TT Gateway or exchange, TT FIX Adapter sends an Order Cancel Reject (9) with:

      ClOrdId(11)=TempClOrdId2

      OrdId(37)=TTOrderId

      OrigClOrdId(41)=<not sent>

Scenario 3: modifying an order through X_TRADER

An order is sent, cancel/replaced, or canceled by X_TRADER using the same MGT and the acknowledgment is forwarded to the FIX client, so TT FIX Adapter sends an Execution Report (8) with:

ExecTransType(20)=0

Exec (150)= D (Restate)

ClOrdId(11)=<not sent>

OrdId(37)=TTOrderId

OrigClOrdId(41)=<not sent>

TT FIX Adapter sends Execution Report (8) with Tag 150 (ExecType)=D when orders change outside of TT FIX Adapter.

For example, in X_TRADER, the Change button is the equivalent of a TT FIX Adapter Order Cancel Replace Request (G) message. The X_TRADER Cancel/Replace button actually cancels the order on the exchange and then resubmits the order with its changes as a new order. If a trader uses the X_TRADER button, TT FIX Adapter sends an Execution Report (8) with Tag 39 (OrdStatus)=5 and Tag 150 (ExecType)=D. Tag 37 (OrderID) always keeps the same value.