API Support Forum
OEC API > API Support > market order
Author Topic: market order
(3 messages, Page 1 of 1)
Moderators: VPfau
Posts: 1
Joined: Feb 27, 2017

Posted: Mar 16, 2017 @ 11:38 PM             Msg. 1 of 3
I want to be able to place market orders with an fx account where there will be a stop and a limit (the limit may or may not be specified depending on the circumstance). I tried various ways of doing this with the sendocoorders but nothing is accepted.

Can you provide a quick overview of what the code looks like to implement a market order with a stop and a limit?
Posts: 277

Posted: Mar 17, 2017 @ 12:15 PM             Msg. 2 of 3
I do not send related orders, just unlinked market order. Review https://gainfutures.com/api/html/9900566b-260a-4247-8326-9698b013e7b8.htm and scroll down to section

One-Send-Others and One-Cancel-Other

Placing of OSO (or bracket orders) requires only to replace a method SendOrder(OrderDraft) to SendLinkedOrders(OrderDraft,OrderDraft[] ) for OSO and to SendOCOOrders(OrderDraft[]). All other functionality remains the same.

OCO and OSO orders have links to each others:

Parent for reference from a dependent order to the main one

Linked for reference from the main OSO order to dependent ones

OCO for reference from one OCO order to another
Chris M
Posts: 277

Posted: Mar 20, 2017 @ 05:40 PM             Msg. 3 of 3