API Support Forum
User Profile

Viewing User Profile for: RWare2020


About

Feb 11, 2020 03:38 PM

Jan 11, 2023 05:40 PM

Jan 11, 2023 05:40 PM



Post Statistics
RWare2020 has contributed to 183 posts out of 5465 total posts (3.35%) in 1084 days (0.00 posts per day).

20 most recent posts:

API Support » GF API COM: Margin Calculation Request Help Jan 11, 2023 @ 05:40 PM (Total replies: 3)

I have tested doing the individual legs, and it does not give me the correct margin for compound options.

Will you please add the ability to place multiple orders as shown in the documentation as well as the ability to set the values of an IHypoOrderPtr individually so that I can test that out as well.

Thanks.

API Support » GF API COM: Margin Calculation Request Help Dec 21, 2022 @ 10:16 AM (Total replies: 3)

Okay perfect, I'll give that a shot.

Will you please add the ability to place multiple orders as shown in the documentation as well as the ability to set the values of an IHypoOrderPtr individually so that I can test that out as well.

Thanks.

API Support » GF API COM: Margin Calculation Request Help Dec 19, 2022 @ 04:15 PM (Total replies: 3)

I am looking at getting the margin calculation for a compound option order. I am looking at this documentation:

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

1. The IHypoOrderPtr inside of the GF API COM is not allowing me to set the values for contract id, qty, and side saying that there is no put function.

2. The IMarginCalculationRequestBuilderPtr does not allow me to put in multiple orders like the documentation states.

3. To do a compound option order, if I put all legs in, with the list of orders, will it return the correct margin requirement for when I place the compound order? Or does it give me the individual leg margins? If so, how can I get the margin requirement for a compound option order?

Thanks

API Support » GF API COM Momentum Bar of Interval >= 9 Returning 0 for Continuity_OneTime Nov 23, 2022 @ 03:05 PM (Total replies: 2)

Any ETA on when this will be complete?

API Support » GF API COM Momentum Bar of Interval >= 9 Returning 0 for Continuity_OneTime Nov 17, 2022 @ 12:57 PM (Total replies: 2)

When doing a request for momentum bars with interval of >= 9, it returns no historical bars.

API Support » GF API COM Logging in Without Internet Connection Gives Login Failed with Invalid Username or Password Nov 04, 2022 @ 11:31 AM (Total replies: 0)

When logging into the GF API COM without an internet connection, it returns with a fail reason of invalid username or password (fail reason of value 0). I'm assuming that is just the default that gets passed in, but I feel like it is miss leading and needs to send back a different error that indicates connection to the API failed.

Additionally, from this example code: https://gainfutures.com/GFAPI/html/da57e5d9-0be9-4b5c-a8c8-5e39e11b5c98.htm, there is a FailReason.ConnectionError and I can't seem to find it in the GF COM API.

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

Thanks, I appreciate you.

API Support » GF COM API Range/Volume Bar Subscription vs History Request Nov 02, 2022 @ 08:34 PM (Total replies: 0)

After requesting history for volume bars and range bars, we then subscribe to them.

There is an issue with the most recent bar coming back during the subscription vs the historical request. The most recent subscription, if the most recent historical bar doesn't meet the requirements, has a different bar timestamp.

Here is an example. Requesting Volume 1000 bars so that once the volume hits 1000, we get a new bar. When doing the historical request, for an example, we get a bar at 7:25 PM which is the most recent valid historical request. Then when we get the subscription request back, the first subscription has a different timestamp, in this case it is 7:32 PM. The 7:25 PM bar does not have 1000 volume yet, but the subscription came back as a different timestamp indicating a new bar.

Will you please make it so that the subscription has the same timestamp as the most current history request bar (unless the most recent history request bar has the correct volume).

This issue also happens on range bars.

Thanks

API Support » Spreads Not Coming in for SIM Nov 01, 2022 @ 12:08 PM (Total replies: 4)

I don't believe this is a COM related issue. It appears to work correctly in PROD as well.

Thanks

API Support » Spreads Not Coming in for SIM Oct 31, 2022 @ 04:08 PM (Total replies: 4)

Spreads contracts are not pulling in for SIM. They do work in PROD. I'm not sure when this broke, but I do believe they were working as of 10/13.

We are using the GF API COM 32 bit version.

Thanks.
Edited by RWare2020 on Oct 31, 2022 04:10 PM

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