API Support Forum
OEC API > API Support > GF API COM Custom Compound Help
Author Topic: GF API COM Custom Compound Help
(23 messages, Page 2 of 2)
Moderators: VPfau
RWare2020
Posts: 205
Joined: Feb 11, 2020


Posted: Sep 21, 2022 @ 03:07 PM             Msg. 2 of 23
I got there by looking inside of the orders:

https://gainfutures.com/GFAPI/?topic=html/T_GF_Api_Orders_IOrder.htm

and clicking CustomCompound
RWare2020
Posts: 205
Joined: Feb 11, 2020


Posted: Sep 21, 2022 @ 05:30 PM             Msg. 4 of 23
Two issues I'm having:

1. I keep getting a Rejected: Order breaks limits error when attempting to liquidate a compound position

Currently I have a compound position with 3 legs:
OQNEU22 C11990 Long 2
OQNEU22 C12040 Short 2
OQNEU22 P11990 Short 2

I placed this order with order types of Buy and Sell and it filled me.

I have attempted to close it by placing another compound order with these legs:
OQNEU22 C11990 Short 2
OQNEU22 C12040 Long 2
OQNEU22 P11990 Long 2

From my understanding, the order types go as follows:
Buy: Used when going long.
Buy to Cover: Used to decrement your short position
Sell: Used to decrement your long position
Sell Short: Used when shorting the market

So I have also tried this:

OQNEU22 C11990 Sell 2
OQNEU22 C12040 Buy to Cover 2
OQNEU22 P11990 Buy to Cover 2

With no luck on either attempt.

2. Carrying a compound position over the market close is resulting in the fill count for the position pointer to be 0.
RWare2020
Posts: 205
Joined: Feb 11, 2020


Posted: Sep 22, 2022 @ 10:34 AM             Msg. 6 of 23
Re Issue 1:

Attempting to close one of the legs individually resulted in the same error message.

I believe I attempted to close the OQNEU22 C12040 Sell Call and that error message popped.

Then closing the OQNEU22 P11990 Sell Put allowed me to close out the option

Then from there on out I was able to close the rest of the legs.

So it almost seems like when liquidating a compound order, it's not doing it in the correct order by chance?