# GTC order handling

**URL:** <https://forum.fixtrading.org/t/gtc-order-handling/12091>\
**Category:** General Q&A\
**Tags:** xid\_164466, 42-changes, imported\
**Created:** [May 28, 2012, 5:28am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091 "2012-05-28T05:28:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![amodpandya\_x](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amodpandya\_x](https://forum.fixtrading.org/u/amodpandya_x)\
**Post date:** [May 28, 2012, 5:28am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/1 "2012-05-28T05:28:41Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![amodpandya\_x](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amodpandya\_x](https://forum.fixtrading.org/u/amodpandya_x)\
**Post date:** [May 28, 2012, 5:28am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/2 "2012-05-28T05:28:41Z")

</div>

Hello All-

The following question is not specific to 4.2 but I wanted to get feedback from the users here…

Can folks please shed some light on how GTC/GTD orders are (should be) handled in a buy-side OMS?  
Example: I send a BUY 100 IBM GTC order to sell side  
At the end of day 1, only 50 shares get filled.

Question:

What happens now (at the end of day 1)?  
The same order with the same original (client and broker) orderID persists in both OMS’s (buy & sell) as a partial for next day

- OR -

does the buy-side OMS create a new order for the Remaining Qty (50) the next day (retaining the other parameters)

Any help/insight would be appreciated.

Thank you

---

<div class="post-metadata">

**Author:** ![anubhawsinha\_x](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anubhawsinha\_x](https://forum.fixtrading.org/u/anubhawsinha_x)\
**Post date:** [May 28, 2012, 6:34am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/3 "2012-05-28T06:34:54Z")

</div>

Hi John,

For handling such cases it is important to understand if the sell side supports GTC orders or not. Following are the two possible cases.

Case 1- Sell side supports GTC/GTD orders  
In such setup both Buy/Sell side application should persists the original orderID and any further activity should be done on the same orderID. Everyday before the start of the trading day till the order is active, sell side should send a restated message to buy side with all the order details to sync both the side.

Case 2- Sell side doesnt support GTC/GTD orders  
In such setup, it is for the buy side to create a new order before the start of the trading day till the order is activ at buy side.

Regards  
Anubhaw

> Hello All-
> 
> The following question is not specific to 4.2 but I wanted to get feedback from the users here…
> 
> Can folks please shed some light on how GTC/GTD orders are (should be) handled in a buy-side OMS?  
> Example: I send a BUY 100 IBM GTC order to sell side  
> At the end of day 1, only 50 shares get filled.
> 
> Question:
> 
> What happens now (at the end of day 1)?  
> The same order with the same original (client and broker) orderID persists in both OMS’s (buy & sell) as a partial for next day
> 
> - OR -
> 
> does the buy-side OMS create a new order for the Remaining Qty (50) the next day (retaining the other parameters)
> 
> Any help/insight would be appreciated.
> 
> Thank you

---

<div class="post-metadata">

**Author:** ![amodpandya\_x](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amodpandya\_x](https://forum.fixtrading.org/u/amodpandya_x)\
**Post date:** [May 28, 2012, 8:04am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/4 "2012-05-28T08:04:54Z")

</div>

Thanks Anubhaw.

i have a follow-up question:

In case 1, what happens to the trade and settlement date on the order?  
If the order gets filled over multiple days - would the order then theoretically have multiple trade and settlement days?

Thanks again.

> Hi John,
> 
> For handling such cases it is important to understand if the sell side supports GTC orders or not. Following are the two possible cases.
> 
> Case 1- Sell side supports GTC/GTD orders  
> In such setup both Buy/Sell side application should persists the original orderID and any further activity should be done on the same orderID. Everyday before the start of the trading day till the order is active, sell side should send a restated message to buy side with all the order details to sync both the side.
> 
> Case 2- Sell side doesnt support GTC/GTD orders  
> In such setup, it is for the buy side to create a new order before the start of the trading day till the order is activ at buy side.
> 
> Regards  
> Anubhaw
> 
> > Hello All-
> > 
> > The following question is not specific to 4.2 but I wanted to get feedback from the users here…
> > 
> > Can folks please shed some light on how GTC/GTD orders are (should be) handled in a buy-side OMS?  
> > Example: I send a BUY 100 IBM GTC order to sell side  
> > At the end of day 1, only 50 shares get filled.
> > 
> > Question:
> > 
> > What happens now (at the end of day 1)?  
> > The same order with the same original (client and broker) orderID persists in both OMS’s (buy & sell) as a partial for next day
> > 
> > - OR -
> > 
> > does the buy-side OMS create a new order for the Remaining Qty (50) the next day (retaining the other parameters)
> > 
> > Any help/insight would be appreciated.
> > 
> > Thank you

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [May 28, 2012, 2:32pm UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/5 "2012-05-28T14:32:33Z")

</div>

[original email was from Greg Wood - [gregjwood@hotmail.com](mailto:gregjwood@hotmail.com) ]  
Hi Amod (John),

The use of a GTC is really just a way for ensuring that you are in the market over multiple days and has no influence on how resulting trades are settled.

Each execution on a GTC (or GTD) has the settlement date of the day of execution, so if you are executed in clips over multiple days then each clip has a different trade date and settlement.

Brokers will send a done-for-day message to tell you how much has been executed for today and how much has been executed cumulatively. It is optional (but good practice) to send a restate message at the start of the next day to reconfirm what was sent in the previous done-for-day message and tell you what quantity is open for trading today.

Check the order state matrices in the spec for whatever version of FIX you are using. These will detail the exact message flow for day 1, day 2, etc of a GTC order. Note that brokers may deviate slightly from the official spec, but not by much. For example they may tell you the trade date or settlement date for each execution, but may not depending on how their systems work.

Regards,

- Greg

> Thanks Anubhaw.
> 
> i have a follow-up question:
> 
> In case 1, what happens to the trade and settlement date on the order?  
> If the order gets filled over multiple days - would the order then theoretically have multiple trade and settlement days?
> 
> Thanks again.
> 
> > Hi John,
> > 
> > For handling such cases it is important to understand if the sell side supports GTC orders or not. Following are the two possible cases.
> > 
> > Case 1- Sell side supports GTC/GTD orders  
> > In such setup both Buy/Sell side application should persists the original orderID and any further activity should be done on the same orderID. Everyday before the start of the trading day till the order is active, sell side should send a restated message to buy side with all the order details to sync both the side.
> > 
> > Case 2- Sell side doesnt support GTC/GTD orders  
> > In such setup, it is for the buy side to create a new order before the start of the trading day till the order is activ at buy side.
> > 
> > Regards  
> > Anubhaw
> > 
> > > Hello All-
> > > 
> > > The following question is not specific to 4.2 but I wanted to get feedback from the users here…
> > > 
> > > Can folks please shed some light on how GTC/GTD orders are (should be) handled in a buy-side OMS?  
> > > Example: I send a BUY 100 IBM GTC order to sell side  
> > > At the end of day 1, only 50 shares get filled.
> > > 
> > > Question:
> > > 
> > > What happens now (at the end of day 1)?  
> > > The same order with the same original (client and broker) orderID persists in both OMS’s (buy & sell) as a partial for next day
> > > 
> > > - OR -
> > > 
> > > does the buy-side OMS create a new order for the Remaining Qty (50) the next day (retaining the other parameters)
> > > 
> > > Any help/insight would be appreciated.
> > > 
> > > Thank you

---

<div class="post-metadata">

**Author:** ![ryanpierce\_x](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@ryanpierce\_x](https://forum.fixtrading.org/u/ryanpierce_x)\
**Post date:** [May 29, 2012, 3:48pm UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/6 "2012-05-29T15:48:02Z")

</div>

To be clear, there is a difference between what SHOULD happen, and what DOES happen. GTC processing was an area of FIX where there has been a lot of ambiguity in the old days of FIX, and FIX 4.2 introduced new concepts to make GTC orders unambiguous.

First and foremost, OrderQty, CumQty, and AvgPx refer to the entirety of the order across all days. So assume I place a GTC order for 1000, and 200 get filled on the first day. The next day, I get a partial fill for 100. LastQty=100, OrderQty=1000, CumQty=300.

FIX 4.2 introduces fields for DayOrderQty, DayCumQty, and DayAvgPx. So, at the start of the second day, DayOrderQty=800, DayCumQty=0. After the first partial fill, we have:

OrderQty=1000  
DayOrderQty=800  
CumQty=300  
DayCumQty=100  
AvgPx=[Average for both partial fills]  
DayAvgPx=[Price of the fill on the second day]

Next, there is restatement. At the start of the day, one can inform the client of the status of the order by sending an Execution Report with ExecType=C (Restated), OrdStatus=1 (Partially Filled), and the various quantities and average prices set appropriately. This lets them know the GTC order is still on the books, how much was filled in prior days, and how much is remaining to fill today. Note the field ExecRestatementReason. It would usually be 1 in this case, where 1 = GT renewal / restatement (no corporate action).

Corporate actions make things really messy. Let’s say, between Day 1 and Day 2, the stock splits 2 for 1. In that case, you’d send:

ExecType = C (Restated)  
ExecRestatementReason = 0 (GT Corporate Action)  
OrdStatus = 1 (Partially Filled)  
OrderQty = 2000 (note it doubled due to the split)  
CumQty = 400 (again, it doubled)  
DayOrderQty = 1600 (Because the 800 left at the end of yesterday were doubled for today)  
AvgPx = Half of what it was yesterday  
Price = Half of what it was yesterday

Corporate actions, in general, can get very messy. Exchanges have rules for dealing with GTC order situations, including splits, reverse splits, stocks going ex-dividend, etc. and how to change prices, what to do if DNR or DNI were set on an order, etc.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![johncameron](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.fixtrading.org/johncameron/32/56_2.png) [@johncameron](https://forum.fixtrading.org/u/johncameron)\
**Post date:** [May 30, 2012, 4:50am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/7 "2012-05-30T04:50:41Z")

</div>

I think this is a good summary of multi day order handling, so I have taken the liberty of summarizing this thread on FIXwiki at [http://fixwiki.org/fixwiki/TimeInForce/1\_GoodTillCancel](http://fixwiki.org/fixwiki/TimeInForce/1_GoodTillCancel) (and references from the [http://fixwiki.org/fixwiki/TimeInForce](http://fixwiki.org/fixwiki/TimeInForce) and [http://fixwiki.org/fixwiki/TimeInForce/6\_GoodTillDate](http://fixwiki.org/fixwiki/TimeInForce/6_GoodTillDate) pages).

Feel free to modify what I have written if you think I have got something wrong.

---

<div class="post-metadata">

**Author:** ![amodpandya\_x](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@amodpandya\_x](https://forum.fixtrading.org/u/amodpandya_x)\
**Post date:** [May 30, 2012, 6:55am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/8 "2012-05-30T06:55:52Z")

</div>

All

thanks a lot for your contributions to this topic - much appreciated.  
i do have one point on the corporate actions. based on this link that points to Interactive brokers…it looks like all open GTC orders are automatically canceled upon fwd or reverse splits which should make our lives easier.

> **[Good-Til-Canceled (GTC) Orders | Interactive Brokers LLC](https://www.interactivebrokers.com/en/trading/orders/gtc.php)**
>
> An order that uses the Good-Til-Canceled (GTC) time in force will continue to work until the order fills or is canceled

> I think this is a good summary of multi day order handling, so I have taken the liberty of summarizing this thread on FIXwiki at [Welcome fixwiki.org - BlueHost.com](http://fixwiki.org/fixwiki/TimeInForce/1_GoodTillCancel) (and references from the [Welcome fixwiki.org - BlueHost.com](http://fixwiki.org/fixwiki/TimeInForce) and [Welcome fixwiki.org - BlueHost.com](http://fixwiki.org/fixwiki/TimeInForce/6_GoodTillDate) pages).
> 
> Feel free to modify what I have written if you think I have got something wrong.

---

<div class="post-metadata">

**Author:** ![ryanpierce\_x](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@ryanpierce\_x](https://forum.fixtrading.org/u/ryanpierce_x)\
**Post date:** [May 30, 2012, 4:13pm UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/9 "2012-05-30T16:13:30Z")

</div>

> thanks a lot for your contributions to this topic - much appreciated.  
> i do have one point on the corporate actions. based on this link that points to Interactive brokers…it looks like all open GTC orders are automatically canceled upon fwd or reverse splits which should make our lives easier.
> 
> [Good-Til-Canceled (GTC) Orders | Interactive Brokers LLC](http://www.interactivebrokers.com/en/trading/orders/gtc.php)

That is one particular method of handling the situation which, admittedly, makes processing a lot simpler. But I want to be clear that FIX doesn’t require cancelling as a result of a split or reverse split; as I illustrated, it is possible to represent this within FIX.

---

<div class="post-metadata">

**Author:** ![johncameron](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.fixtrading.org/johncameron/32/56_2.png) [@johncameron](https://forum.fixtrading.org/u/johncameron)\
**Post date:** [May 31, 2012, 2:20am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/10 "2012-05-31T02:20:52Z")

</div>

Hi Ryan

When I was trying to summarize this thread, I didn’t know what DNR and DNI meant - so I left your last paragraph out. What were you referring to there? And what FIX field/values do they correspond to?

> Corporate actions, in general, can get very messy. Exchanges have rules for dealing with GTC order situations, including splits, reverse splits, stocks going ex-dividend, etc. and how to change prices, what to do if DNR or DNI were set on an order, etc.

---

<div class="post-metadata">

**Author:** ![johncameron](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.fixtrading.org/johncameron/32/56_2.png) [@johncameron](https://forum.fixtrading.org/u/johncameron)\
**Post date:** [May 31, 2012, 5:33am UTC](https://forum.fixtrading.org/t/gtc-order-handling/12091/11 "2012-05-31T05:33:10Z")

</div>

Offline I have been informed that DNR is [Welcome fixwiki.org - BlueHost.com](http://fixwiki.org/fixwiki/ExecInst/F_DoNotReduce) and DNI is [Welcome fixwiki.org - BlueHost.com](http://fixwiki.org/fixwiki/ExecInst/E_DoNotIncrease).

I have updated the thread summary on FIXwiki accordingly.

> Hi Ryan
> 
> When I was trying to summarize this thread, I didn’t know what DNR and DNI meant - so I left your last paragraph out. What were you referring to there? And what FIX field/values do they correspond to?
> 
> > Corporate actions, in general, can get very messy. Exchanges have rules for dealing with GTC order situations, including splits, reverse splits, stocks going ex-dividend, etc. and how to change prices, what to do if DNR or DNI were set on an order, etc.
