API Support Forum
User Profile

Viewing User Profile for: JSmith5611


About

N/A

Feb 23, 2023 07:25 AM

Mar 03, 2023 06:46 AM



Post Statistics
JSmith5611 has contributed to 179 posts out of 5479 total posts

20 most recent posts:

API Support » COM API: Greeks API Subscription Feb 23, 2023 @ 07:25 AM (Total replies: 5)

I forgot to update you, sorry. The fix was released in 4.11.127.222 (released on 1/28)
Jason Smith


API Support » GF API COM OnMarginCalculationCompleted to Being Hit After doing Margin Request Feb 16, 2023 @ 11:48 AM (Total replies: 4)

Placing a margin calc request with multiple orders, and no position is working just fine for me.
Jason Smith


API Support » GF API COM: Margin Calculation Request Help Feb 16, 2023 @ 11:42 AM (Total replies: 4)

I've tested sending mutliple orders in a margin request with the latest COM api (4.11.210.227), and it works fine for me.
HypoOrders and HypoPositions are immutable by design (same for the .NET api)
Jason Smith


API Support » COM API: Greeks API Subscription Jan 03, 2023 @ 01:21 PM (Total replies: 5)

There is an issue. will be fixed.
Jason Smith


API Support » COM API: Greeks API Subscription Jan 03, 2023 @ 12:29 PM (Total replies: 5)

The third param should be of type GF_API_COM.IGreeks
I'll check to see if there's a problem with that event.
Jason Smith


API Support » GF API COM: Margin Calculation Request Help Dec 21, 2022 @ 06:54 AM (Total replies: 4)

From what i remember about the margin calc, the best way would be to place each leg as an separate order in the calc request.

This can be done as the following:

GF_Api_COM::IMarginCalculationRequestBuilderPtr builder;
builder.CreateInstance(__uuidof(GF_Api_COM::MarginCalculationRequestBuilder));
GF_Api_COM::IAccountListPtr accs = GFAPI()->Accounts->Get();
GF_Api_COM::IAccountPtr account = accs->GetAt(0);
builder = builder->WithAccountID(account->id);

//Loop next line for each contract / side / quantity
builder = builder->WithOrder(GFAPI()->Margin->CreateHypoOrder(contract->id, GF_Api_COM::OrderSide_Buy, quantity));
Jason Smith


API Support » Spreads Not Coming in for SIM Nov 03, 2022 @ 08:55 AM (Total replies: 4)

I found the cause of this, and have fixed it.. but it will take a full system restart to take affect.
Jason Smith


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

Where does it say that?

There's no side property here:

https://gainfutures.com/GFAPI/html/T_GF_Api_Contracts_Legs_Leg.htm
Jason Smith


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

Legs of contracts (once created) don't really have a side. They do have a quantity, which can be negative.
Jason Smith


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

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


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

Unfortunately, COM strips out the markers for flag enums.
Jason Smith


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

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


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

I installed the same build you did, GAIN GFAPI COM 4.7.917.200.exe, downloaded from the website.
Jason Smith


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

This really doesn't make sense. This should be working, you have the right version installed.
Jason Smith


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

Do you just have one subkey under
\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Record\{8CE4A503-8AFF-388C-A2AA-B9DAAFA72E05}
?
Jason Smith


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

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


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

does this registry key exist for you?

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Record\{FA7A3A10-731F-323E-BA0F-DFA47394A29C}

if so, what's underneath it?
Jason Smith


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

That are the correct versions.. I don't know why its working for me and not for you
Jason Smith


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

Just the first 8 or so digits will work
Jason Smith


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

Can you send me your File Version and Product Version of the GF.Api.COM.dll in your C:\Program Files (x86)\GAIN\GFAPI COM folder?
Jason Smith