Author |
Topic: GF API COM: No DataFeedEntitlementSubscriptionType Inside of IDataFeedEntitlementPtr (36 messages, Page 2 of 2) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
That key does exist and there is the version number 4.7.917.200 is underneath it. Do you need the values within there?
|
||||
JSmith5611 Posts: 187 Joined: |
No, just the existence of that key is enough to show me the correct version is installed, since that it the UUID of the DataFeedEntitlement SubscriptionType enum.
I'm still not sure what's going on, but i'm continuing to look through the registry to see if there's a way to tell if multipler versions are installed. Jason Smith
|
||||
JSmith5611 Posts: 187 Joined: |
Do you just have one subkey under
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Record\{8CE4A503-8AFF-388C-A2AA-B9DAAFA72E05} ? Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
Yes just one subkey with the same version as listed before.
|
||||
JSmith5611 Posts: 187 Joined: |
This really doesn't make sense. This should be working, you have the right version installed.
Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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? |
||||
JSmith5611 Posts: 187 Joined: |
I installed the same build you did, GAIN GFAPI COM 4.7.917.200.exe, downloaded from the website.
Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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?
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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. |
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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 |
||||
JSmith5611 Posts: 187 Joined: |
its a flag enum.
try: VARIANT_BOOL hasDom = (pDfe->SubscriptionType | GF_Api_COM::DataFeedEntitlementSubscriptionType::DataFeedEntitlementSubscriptionType_DOM) == GF_Api_COM::DataFeedEntitlementSubscriptionType::DataFeedEntitlementSubscriptionType_DOM)); The values in the enum are: TopOfBook = 1, DOM = 2 it is possible to have BOTH be true, in which case the underlying value of the enum will be 3. Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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. |
||||
JSmith5611 Posts: 187 Joined: |
Unfortunately, COM strips out the markers for flag enums.
Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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. |
||||
JSmith5611 Posts: 187 Joined: |
What do you get when you case the SubscriptionType to an integer?
should either be 2 if only DOM, or 3 if DOM + TopOfBook Also, what programming language are you using? Jason Smith
|
||||
RWare2020 Posts: 206 Joined: Feb 11, 2020 |
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 |
||||