API Support Forum
User Profile

Viewing User Profile for: RWare2020


About

Feb 11, 2020 03:38 PM

Sep 22, 2022 10:34 AM

Sep 22, 2022 10:34 AM



Post Statistics
RWare2020 has contributed to 173 posts out of 5432 total posts (3.18%) in 957 days (0.00 posts per day).

20 most recent posts:

API Support » GF API COM Custom Compound Help Sep 22, 2022 @ 10:34 AM (Total replies: 22)

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?

API Support » GF API COM Custom Compound Help Sep 21, 2022 @ 05:30 PM (Total replies: 22)

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.

API Support » GF API COM Custom Compound Help Sep 21, 2022 @ 03:07 PM (Total replies: 22)

I got there by looking inside of the orders:

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

and clicking CustomCompound

API Support » GF API COM Custom Compound Help Sep 21, 2022 @ 03:05 PM (Total replies: 22)

There is a side property here:

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

API Support » GF API COM Custom Compound Help Sep 21, 2022 @ 02:32 PM (Total replies: 22)

So negative quantity means a sell? Why does the documentation show that legs should have a side property?

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 21, 2022 @ 11:39 AM (Total replies: 35)

Casting to an integer appears to work. It is returning 3 for a demo account and 1 for a real account that does not have DOM.

I am using C++

Thanks

API Support » GF API COM Custom Compound Help Sep 21, 2022 @ 10:37 AM (Total replies: 22)

After play with it for a minute, I actually like the way you guys have it setup where it is just one order that comes back. Now that I know there is a Side property that should be in there it makes things easier.

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 20, 2022 @ 02:58 PM (Total replies: 35)

VARIANT_BOOL vbDOM = ((pDfe->SubscriptionType | GF_Api_COM::DataFeedEntitlementSubscriptionType::DataFeedEntitlementSubscriptionType_DOM) == GF_Api_COM::DataFeedEntitlementSubscriptionType::DataFeedEntitlementSubscriptionType_DOM);

is returning 0 for both accounts that have DOM as well as do not have DOM.

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 20, 2022 @ 02:18 PM (Total replies: 35)

Is there a way that I can tell if an enum is a flag enum?

So I would need to check if it is 0, 2, or 3 since 0 is All?

Thanks again.

API Support » GF API COM Custom Compound Help Sep 20, 2022 @ 02:11 PM (Total replies: 22)

The CustomOptionSpread is now in there, thanks for getting that done.

Can I please get some help with determining if the position was linked with an order that I mentioned above?

Additionally, from what I have found, when placing a custom compound order, it only returns a single order back?

It doesn't make too much sense there, but I do see that the order contract has legs with the correct amount of legs. The ILegPtr only has a quantity and a contract pointer as available properties. What happens if they place a buy leg and a sell leg? Why doesn't the leg have a side attached to it?

Just looking into the documentation, it might be that the side was left out of the COM API. Can that please get added in.

I'm not exactly how a COM API is created, but it seems like random things are being left out, is there not a way to sync everything so that the COM API has all of the member variables that the normal API has?

Thanks

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 20, 2022 @ 02:02 PM (Total replies: 35)

Now that I have the subscription type, it doesn't appear to be correctly getting the subscription type?

To determine if the user has DOM subscription in OEC we did this:
iterating through OECAPI()->DataFeedEntitlements
OECAPICOM::IDataFeedEntitlementPtr pDfe = OECAPI()->DataFeedEntitlements->Item(i);
VARIANT_BOOL hasDom = pDfe->DOM;

-----

in GF we are doing this:
Iterating through GFApi()->Exchanges->GetEntitlements()
IDataFeedEntitlementPtr pDfe = GFApi()->Exchanges->GetEntitlements()->GetAt(i);
VARIANT_BOOL hasDom = (pDfe->SubscriptionType == GF_Api_COM::DataFeedEntitlementSubscriptionType::DataFeedEntitlementSubscriptionType_DOM);

All return false even for demo accounts that should have it unlocked.

Thanks

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 20, 2022 @ 10:47 AM (Total replies: 35)

Just downloaded the version here: https://gainfutures.com/gainfuturesapi/documentation/

Same version number but it is working, so I'm not sure what version was sent to me, but it doesn't seem like it had it included.

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 02:28 PM (Total replies: 35)

Yeah I'm not sure. I know they are different version numbers, but there's no way you are downloading a 64 bit by some chance, right?

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 01:04 PM (Total replies: 35)

Is it possible that something went wrong with the build that you sent me vs the one that was published? Like you have it built with the fixes but they didn't get actually published?

Do you have any other suggestions for me to try?

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 12:01 PM (Total replies: 35)

Yes just one subkey with the same version as listed before.

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 11:04 AM (Total replies: 35)

That key does exist and there is the version number 4.7.917.200 is underneath it. Do you need the values within there?

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 10:47 AM (Total replies: 35)

I'm not quite sure. I have done the normal steps I do to update my project 3 times now with no luck.

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 10:21 AM (Total replies: 35)

6367a9fb07cce823873bef3883de05b97

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 10:17 AM (Total replies: 35)

File Version: 4.7.917.200

Still trying to get the product version. Won't let me copy/paste and it is cut off

API Support » GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr Sep 19, 2022 @ 09:49 AM (Total replies: 35)

Just tried:

Uninstalling
Restarting machine
Installing
Restarting machine
Replacing tlb in project
Opening project

Still no luck.