API Support Forum
OEC API > API Support > Modify Orders
Author Topic: Modify Orders
(13 messages, Page 1 of 1)
Moderators: VPfau
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Jan 04, 2013 @ 01:34 AM             Msg. 1 of 13
Hi,
We run an API code which logs all the orders from accounts under our main manager account. However, while doing so we are having trouble following Modified Orders. From the examples that I saw from my log there are multiple kinds of modify orders some in which the ticket number is changed some in which it remains the same. I want to understand the logic for the same. Could you please explain it or direct me to the actual location in the documentation where I can find a satisfactory explanations.

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jan 04, 2013 @ 08:13 AM             Msg. 2 of 13
Good morning, could you please send me order id of a case when ticket number of modify command remains the same?

Victor Vins
Lead Software Developer
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Jan 07, 2013 @ 03:23 AM             Msg. 3 of 13
The order number is 96004630. It has a modify order as its first entry. Do not know if it was modified from a particular order or a new one.

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jan 07, 2013 @ 08:18 AM             Msg. 4 of 13
I don't see any issues with this order. Stop order was auto-modified to market order by stop price trigger

12/13/12 11:12:29.260 95985982 Create Sell 4 YMZ2 STP 13202 Executed
12/13/12 11:12:29.260 146405205 Sent
12/13/12 11:12:29.293 146405206 Working
12/13/12 12:18:26.743 96004630 Modify Sell 4 YMZ2 MKT
12/13/12 12:18:26.743 96004630 Modify Executed Auto-Updated
12/13/12 12:18:26.807 146449210 Fill 4@13202
12/13/12 12:18:26.807 146449211 Completed

Victor Vins
Lead Software Developer
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Jan 08, 2013 @ 12:48 AM             Msg. 5 of 13
Makes sense. One more question though, is there a way to figure out that the order number 96004630 is a modified order for 95985982?

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jan 08, 2013 @ 08:15 AM             Msg. 6 of 13
You can find out ID of original order via Command.Order property (for example, modifyCmd.Order.ID)

Victor Vins
Lead Software Developer
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Jan 09, 2013 @ 06:02 AM             Msg. 7 of 13
Thanks. I will look that up.
Also I noticed the close prices for some of the contracts change if I check the next day. For example, we have a script which downloads the close of day prices end of day and sometimes if I manually check the price after a couple of days the downloaded price is different from the one on OEC Historical prices.

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jan 09, 2013 @ 08:20 AM             Msg. 8 of 13
Actually, we do not change historical bars, except very rare situations after outages. Could you please share any sample for investigation?

Victor Vins
Lead Software Developer
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Jan 15, 2013 @ 08:53 AM             Msg. 9 of 13
Example: close foe GGCZ3 when downloaded through our api script shows 1681 and currently if I check it shows 1657.5
Please check and let me know.

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jan 15, 2013 @ 09:10 AM             Msg. 10 of 13
Could you share your source code to reproduce the problem?

Below is a list of daily bars for this contract that I've downloaded via OEC Trader. The first bar that can include 1657.5 is January, 7

Time,High,Low,Open,Close
2013/01/07,1669.9,1654.1,1669.0,1656.6
2013/01/08,1671.8,1662.0,1665.5,1668.5
2013/01/09,1673.1,1663.9,1672.0,1667.2
2013/01/10,1688.0,1666.0,1666.7,1682.7
2013/01/11,1685.3,1665.4,1685.0,1672.3
2013/01/14,1684.2,1670.0,1670.0,1678.1
2013/01/15,1693.4,1677.5,1677.5,1693.0

Victor Vins
Lead Software Developer
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Feb 07, 2013 @ 07:05 AM             Msg. 11 of 13
I have a series of orders which have a lot of consecutive modifies. I would like to email the orders to you and if possible discuss them with you. I am trying to develop a logic to keep track of our users and their p/l and am not being able to decipher the logic for modify orders. Would it be possible for you to discuss the same with me over the phone? It would really help.
Also for the series of orders I would need to email them to you. What would be a good address to send the email to? Or can I attach it here?

Thomas Ries
TRies
Posts: 22
Joined: Mar 22, 2012


Posted: Feb 18, 2013 @ 02:54 AM             Msg. 12 of 13
HI,
Regarding the Modify Order query I had sent earlier, Chris had replied with the following order fill to be downloaded.

Order fill data.
For a list of all members of this type, see Fill Members.
System.Object
MarshalByRefObject
IDObject<Int32>
IDObject
OrderChild
Fill
public sealed class Fill : OrderChild

When I read the API there is a field called Parent Order Associated with OrderChild.

1) Is this a field which will exist with all modified orders?
2) The parent order would mean the original order from which the order was modified? so we can directly associate the modified order with the original mentioned order.

Thomas Ries
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 18, 2013 @ 09:06 AM             Msg. 13 of 13
Hello,

OrderChild.Order refers to Order object ("original order"). Modify request is an object of Command class. There is no any link between fill and modify request.

Victor Vins
Lead Software Developer