API Support Forum
User Profile

Viewing User Profile for: VPfau


About

N/A

Nov 21, 2022 09:26 AM

Nov 21, 2022 09:26 AM

https://gainfutures.com/




Post Statistics
VPfau has contributed to 152 posts out of 5452 total posts

20 most recent posts:

API Support » ValPrice class Nov 21, 2022 @ 09:26 AM (Total replies: 2)

Hello,

VolPrice class is used in IPosition interface. See Short, Long, Net, Prev position properties
Vitaliy Pfau


API Support » Instruments not found Nov 08, 2022 @ 07:50 AM (Total replies: 2)

Hello Mauro,

It is floating issue and you can still see it. We are working on the resolution.

Thank you
Vitaliy Pfau


FIX Support » FAST Logon SendingTime encoding Sep 26, 2022 @ 12:17 PM (Total replies: 2)

Hello,

We do not implement FAST protocol ourselves and use public libraries for that.
Probably you can ask the question at related community: https://www.fixtrading.org/standards/fast/

Thank you
Vitaliy Pfau


Market Data » Marginrequest does not always respond Sep 26, 2022 @ 07:57 AM (Total replies: 7)

Sorry, it is hard to understand what is going on based on lines above.
Can you provide a full example project that replicate the issue?
Vitaliy Pfau


Market Data » Marginrequest does not always respond Sep 23, 2022 @ 11:58 AM (Total replies: 7)

It is very possible that you use a contractID in your requests without obtaining a contract first.
To be able to send margin requests you have to have a contract on a client side doing lookup or other loading methods.
Vitaliy Pfau


FIX Support » FAST - how to loadticks for 1 full day? Sep 23, 2022 @ 10:50 AM (Total replies: 1)

Hello,

Amount of ticks for each contract for each day is different and we do restrict data we send back.
You can request data you need by portions based on the server response.

Thank you
Vitaliy Pfau


FIX Support » Out of SessionTime??? Sep 23, 2022 @ 10:47 AM (Total replies: 1)

Hello,

I don't see that we send this message to you. At your last sessions you do not send heartbeats back or respond to a test message and get disconnected:

8=FIX.4.4^A9=585^A35=A^A34=1^A49=OEC_TEST^A52=20220923-14:54:06^A56=TLau471^A98=0^A108=30^A10=027^A
8=FIX.4.4^A9=54^A35=0^A34=2^A49=OEC_TEST^A52=20220923-14:54:36^A56=TLau471^A10=155^A
8=FIX.4.4^A9=63^A35=1^A34=3^A49=OEC_TEST^A52=20220923-14:54:42^A56=TLau471^A112=TEST^A10=172^A
Vitaliy Pfau


Market Data » Marginrequest does not always respond Sep 22, 2022 @ 03:01 PM (Total replies: 7)

Hello,

I checked all contracts you specified and all of them are working but MEZ22. We do not have MEZ22 on API environment.
I suppose the issue is that you don't see errors we send back if something goes wrong. Make sure you subscribe to `client.Traders.TraderError` event.
Most often issue with margin requests is that you cannot send multiple requests in parallel. You need to wait `client.Margin.MarginCalculationCompleted` before send a new request.

Please see example here: https://bitbucket.org/GainFuturesDev/workspace/snippets/Eg6jXk

To See simultaneous error send two requests in line 44 like:
client.Margin.RequestMarginCalculation(request);
client.Margin.RequestMarginCalculation(request);

and you should get something similar at console:

Connecting...
Press any key to exit
Login Completed
TraderApi error occurred: Only one simultaneous margin calculation request per account is allowed
Margin request completed
Initial: 15400
Maintenance: 14000
Vitaliy Pfau


Market Data » Marginrequest does not always respond Sep 21, 2022 @ 07:44 AM (Total replies: 7)

Hello,

Please provide account name, environment name, GFAPI version and example of request you are sending.

Thank you
Vitaliy Pfau


API Support » GF API COM Custom Compound Help Sep 16, 2022 @ 08:28 AM (Total replies: 22)

>I think my last question, is there a way to determine if the position was placed with a compound order? Every combination I have tried doesn't seem to correctly associate the IsCompound and the legs correctly.
An order should contain reference to a compound.
Position has reference to a basic contract. We split compounds by it's legs for positions.
Vitaliy Pfau


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

>So are you saying that we can't just send off legs defined by the user (with the same base contract) and have the api just take it?
Im saying that each custom compound goes thru validation procedure. For legs that shared same base contract we have CustomOptionSpread type.

>If that is the case, what are compound types: Unknown, Generic, and CustomOptionSpread used for?
Unknown, Generic are for predefined contracts; These are not participate in user's contract request procedure.
See above for CustomOptionSpread.

>How would one do a Synthetic Long (or any of the other no longer supported custom compounds) if it is no longer supported? They just can't place those?
They can place order for Synthetic Long contracts if we have them in the system already. Basically if you can look up contract and obtain contract id.
Vitaliy Pfau


API Support » GF API COM Custom Compound Help Sep 15, 2022 @ 12:15 PM (Total replies: 22)

> For custom compound orders, is there something that needs to be done with the base OrderDraftBuilder?
OrderDraftBuilder is a helper class that walks you thru a creation process. You can build a draft without it.

>Like a specific contract id?
you provide or contract id or customcompound, not both. If you provide both the contractid will be ignored in advance of compound information.

>Side?
Buy will open order as is, Sell actually flips legs.

>Qty?
Qty will multiply legs' qty. If strategy required 1/2/1 qty on legs then sending main 2 qty of 1/2/1 legs will mean 2/4/2 on legs


>Rate? Since they are separate legs, it doesn't seem like any of those apply (with the exception of contract id of the base contract maybe)
you specify base contract for each leg separately.

>So if I want to send off a user defined compound, what should I put in for the compound type?
Compound type is requirements for legs. If you provide IronButterfly compound type, you should provide valid legs for this strategy.


>Why wouldn't you always do a user defined compound and let the uplink provider handle the predefined strategies?
Because the uplink provider wants us do validation prior sending requests;

>Even following the rules of how the specific legs are shown and putting in the compound type, it sends the order, but comes back
> with an invalid compound type. I have tried a synthetic long, I will try a straddle following the same values you have mentioned in your reply.
SyntheticLong, FutureDoubleButterfly, FutureReverseSpread, Call_1X2, Put_1X2 discontinued or no longer supported in custom compounds.
Vitaliy Pfau


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

>Am I able to put in any legs inside of the custom compound order and put a generic compound type and have it go through?

Let me put here some more details. All custom compounds are split to groups:
- First one (including general) is for predefined contracts. Trade desk can manage such contracts;
- Second group is user defined compounds;

To send an order with custom compound you'll need to specify CustomCompound in order draft; CustomCompund field is a template class with type and set of legs.

On a client side we do a basic validation and send order to the trading platform.
Trading platform checks if we already have such contract in the system and if we have it, we will proceed with order.
If trading platform does not have it, we will check if set of legs matches one of predefined strategies (defined by uplink provider) and if it matches, we request a new contract.

Unfortunately not any legs allowed to created a contract. Legs are defined by contract type. For example: Straddle type has to have buy option call on a first leg and second leg has to match a base contract of first leg, same expiration, put, buy, same strike, side and qty.
Even CustomOptionSpread has limitation: all legs should share same underlying contract and it is not guaranteed that exchange will accept it.
Vitaliy Pfau


Order Execution » Order compound Sep 12, 2022 @ 02:30 PM (Total replies: 2)

Hello,

Each contract should pass a validation procedure before we send it along. We validate only set of predefined strategies.
Vitaliy Pfau


Market Data » Pagination of symbols - ByCriteria Jul 26, 2022 @ 08:51 AM (Total replies: 2)

Hello,

Please see similar topic: https://apisupport.gainfutures.com/Topic/Index/1453
There is a code snipped with example how you can organize a paginated requests:
https://bitbucket.org/GainFuturesDev/workspace/snippets/8Eqk9b/gfapi-paged-load-contracts-by-basesymbol

Also see these functions of ContractLoadRequestBuilder: WithSkipCount, WithResultCount
Vitaliy Pfau


API Support » GFAPI COM Help with Closed Positions Jul 11, 2022 @ 08:30 AM (Total replies: 17)

Hello

this item was released
to SIM at June 26 2022
to PROD at July 9 2022
Vitaliy Pfau


API Support » Custom Compound Option Order in OECAPI Feb 03, 2022 @ 07:27 AM (Total replies: 1)

Hello

OECAPI is obsolete and going to be decommissioned soon. Please use GFAPI
Vitaliy Pfau


API Support » Connection problem Oct 12, 2021 @ 07:52 AM (Total replies: 1)

Hello,

Examples in documentation cannot works as complete application. They only demonstrate different aspects of discussed topics.

To see examples of API clients you can visit this page https://bitbucket.org/GainFuturesDev/?privacy=public

Thank you
Vitaliy Pfau


API Support » Issue pulling in most recent historical daily bar for Grains Jul 08, 2021 @ 07:31 AM (Total replies: 10)

>Did something change with the way grains history is sent back?
No

Please contact our customer service and, if this is system issue, they will make a ticket for developers.
Thank you
Vitaliy Pfau


API Support » LIVE API throwing exception, DEMO API does not Jun 28, 2021 @ 11:51 AM (Total replies: 8)

The ticket hit PROD last weekend.
Thank you
Vitaliy Pfau