API Support Forum
OEC API > API Support > OrderType
Author Topic: OrderType
(2 messages, Page 1 of 1)
Moderators: VPfau
VLuc
Posts: 5
Joined: Jul 17, 2020


Posted: Nov 25, 2020 @ 07:20 AM             Msg. 1 of 2
Hello,

I need to pass multiple orders at the same time:
A sell/buy Stop
A StopLoss
A TakeProfit

I don't understand which ordertype I need to use for each of those orders, and if I can pass them at the same time or if I need to create three different order ?
https://gainfutures.com/GFAPI/html/T_GF_Api_Values_Orders_OrderType.htm

Thank you
VPfau
Moderator
Posts: 164
Joined:


Posted: Nov 27, 2020 @ 09:13 AM             Msg. 2 of 2
Hello VLuc,

I think you meant orders relations instead of order type?

If so, you need OCO and OSO links for orders. See One-Sends-Other (OSO) and One-Cancels-Other (OCO) section in Getting Started/Trading https://gainfutures.com/GFAPI/html/9900566b-260a-4247-8326-9698b013e7b8.htm

Also see SendLinkedOrders() and SendOCOOrders() functions
OCO usage at Advanced Example:
https://bitbucket.org/GainFuturesDev/advancedexample/src/master/GF.AdvancedExample/OrdersControl.cs#lines-174
Vitaliy Pfau