API Support Forum
OEC API > API Support > Linked Orders with Market Orders
Author Topic: Linked Orders with Market Orders
(6 messages, Page 1 of 1)
Moderators: VPfau
THarnett81
Posts: 78
Joined: Jan 13, 2011


Posted: Jun 28, 2011 @ 01:00 PM             Msg. 1 of 6
Cross-posted from Order Execution forum...

Hi, we would like to use SendLinkedOrders for our bracket strategy.

What happens if a user submits a Market Order ( no price )? Will the linked orders work with the main order's filled price? We checked your advanced sample in this case and it generates linked orders with negative prices which immedietaly get rejected because of the same. Can SendLinkedOrders be used for Market Orders. If so, how to provide the delta reference in the linked orders.

Thanks!
THarnett81
Posts: 78
Joined: Jan 13, 2011


Posted: Jun 28, 2011 @ 01:12 PM             Msg. 2 of 6
More info...

We're looking to implement...


OECClient.SendLinkedOrders Method
Sends an chain of orders
public Order[] SendLinkedOrders(
OrderDraft main,
params OrderDraft[] linked
);

There's also an example of this in the OEC API Advance Examples download.
THarnett81
Posts: 78
Joined: Jan 13, 2011


Posted: Jun 28, 2011 @ 01:13 PM             Msg. 3 of 6
As a follow up question, what happens if the main order gets partially filled? Are any linked orders sent? Or, must the main order be fully filled?
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2011 @ 08:46 AM             Msg. 4 of 6
Yes, you can use SendLinkedOrders with market orders. All prices are defined in absolute values, not as a delta relatively filled price of the main order.

Linked orders will be sent on the first partial fill. Quantity of linked orders will reflect filled quantity of the main order.

Victor Vins
Lead Software Developer
THarnett81
Posts: 78
Joined: Jan 13, 2011


Posted: Jun 30, 2011 @ 12:28 PM             Msg. 5 of 6
Thanks for the reply Victor.

But I'm wondering how sending a Market order would work in practice. So I send a Market Order that's linked to an opposite-side Limit order. I send the Link struct with the Market the main order, then my linked Limit order has to have an absolute price.

So Buy Market -> Sell Limit of price x?
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 05, 2011 @ 11:21 AM             Msg. 6 of 6
Unfortunately, OEC doesn't provide such functionality like to send server-side brackets with relative price.

Victor Vins
Lead Software Developer