But I would ask you why would you want to send an OCA order?
Ostensibly the premise one takes when using the API is you can
write
routines that are far more complex and robust than the simple One
Cancels All tag.
The reason is simple. To protect oneself from the event of an isp
failure, you place target exit and stop exit, join them as an oca
group. Then, should your program become disconnected, your position
is protected both ways. The failing here, is on partial fills. Use
the example of a long position. Say you have a target, it gets
partially filled, now you have a half position, and the price pulls
back to the stop. The stop order will fill, the oca logic will
cancel the leftover on the target, and there you sit, short at your
stop.
If you are trading futures, solution sounds simple. Fire off pairs,
one oca group of target and stop for each contract you hold. That's
where the TWS inability to report open orders can be an issue, if you
have 100 pending, and suddenly you see a 'duplicate order' error, it
takes a LOT of figureing to figure it all out.