API Support Forum
OEC API > API Support > Linked Orders, 203487276 and 203487279, Stop cancelled.
Author Topic: Linked Orders, 203487276 and 203487279, Stop cancelled.
(4 messages, Page 1 of 1)
Moderators: VPfau
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Jan 13, 2016 @ 05:09 PM             Msg. 1 of 4
I sent a sell Stop order with Buy Stop.
The sell got accepted, but the buy did not.
I need them to be connected...
So, I have Sell Stop, and when it is triggered, attach to it a Buy Stop.
I remember Main Stop get Working status, and Linked Stop get a Held status...

Why I cannot upload a file here?
http://emeraldone.com/oec.jpg

AND, How can I know from code that the attached/Linked order got cancelled??
In OnOrderConfirmed, I get both orders...
Both with CurrentState=Sent

I tried to search for another indication for failed order...
or, how can I set when I call the order, that if it failed, don't fill it?
When I call SendLinkedOrders....I add a variable that if the Stop Loss order will not succeed, then don't fill the first...
Bind them absolutely.
CMicciche902
Posts: 367
Joined:


Posted: Jan 13, 2016 @ 05:29 PM             Msg. 2 of 4
You are sending invalid trades. You cannot send order qty of ZERO:


TimeStamp ID Text Comments

Order #203487276 Sell 0/0 RLM-MH6 STP 1006.8 by eo707/API002743 TraderStk.vshost
01/13/16 16:49:21.415 203487276 Create Sell 0 RLM-MH6 STP 1006.8 Executed eo707
01/13/16 16:49:21.415 6318640 Sent
01/13/16 16:49:21.478 6318642 Accepted
01/13/16 16:49:21.571 6318644 Working


Link Order #203487277 Buy 0/0 RLM-MH6 STP 1009.0 by eo707/API002743 TraderStk.vshost/Parent Order #203487276

01/13/16 16:49:21.431 203487277 Create Buy 0 RLM-MH6 STP 1009.0 Executed eo707 Auto-Execute
01/13/16 16:49:21.431 6318641 Sent
01/13/16 16:49:21.478 6318643 Held Auto-Execute
01/13/16 16:49:21.571 203487278 Send Cancel
01/13/16 16:49:21.594 203487278 Cancel Executed Auto-cancelled
01/13/16 16:49:21.634 6318645 Cancelled Auto-cancelled

Chris M
CMicciche902
Posts: 367
Joined:


Posted: Jan 13, 2016 @ 05:30 PM             Msg. 3 of 4
You can see order qty of ZERO in your image. Did you over look this?

Chris M
eo707
Posts: 68
Joined: Nov 08, 2011


Posted: Jan 14, 2016 @ 02:14 AM             Msg. 4 of 4
OK,
Next will pay attention, and debug.
you can close ticket.