Author |
Topic: SendLinkedOrders Multiple Order Support (4 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
CKeslin1490 Posts: 4 Joined: Oct 31, 2018 |
I'm migrating our application to the latest GFAPI (v4.0.3.23) and I noticed the IOrdersAPI.SendLinkedOrders method was removed since my initial integration with the GFAPI. I've read the IOrdersAPI.SendOSOOrders method is the intended replacement method, but my application sends a list OCO draft orders (i.e. more than two orders) as an atomic operation. Is there a IOrdersAPI method I can use for my scenario or another technique to keep my operation atomic?
Thanks, Dave |
||||
VPfau Moderator Posts: 164 Joined: |
Hello Dave,
So far you can use only IOrdersAPI.SendOSOOrders function which send OSO with OCO pair. More than that, if you send multiple orders thru 3.5 OECAPI SendLinkedOrders function, only 2 OCO will be accepted. Other orders will be ignored. Vitaliy Pfau
|
||||
DBishop8327 Posts: 1 Joined: Mar 25, 2020 |
Since the API doesn't have the capability to create an OSO with more than an OCO pair. Do you have any guidance on how to support a scenario like this:
1. Create a buy order 2. If buy order filled, create a set of orders to close position (e.g. market delayed order, trailing stop, limit). If any of these position closing orders execute, I'd like to cancel the other two orders. Thanks again for the much appreciated help. Regards, Dave |
||||
VPfau Moderator Posts: 164 Joined: |
Dave,
it is the SendOSOOrders function: IReadOnlyList SendOSOOrders(OrderDraft main, OrderDraft other, OrderDraft oco, OSOGroupingMethod groupingMethod); you send 'main' OSO order and two OCO on it. As soon as 'main' order get filled 'other' and 'oco' increase qty. As 'oco' or 'other' get filled another leg get cancelled. Vitaliy Pfau
|
||||