API Support Forum
User Profile

Viewing User Profile for: VPfau


About

N/A

Jun 25, 2024 01:10 PM

Jun 25, 2024 01:10 PM

https://gainfutures.com/




Post Statistics
VPfau has contributed to 159 posts out of 5623 total posts

20 most recent posts:

FIX Support » Margin request Today @ 01:10 PM (Total replies: 5)

You cannot send 3 sequential 55 tags. NoInstrument is a group. From the documentation:
Request:
8=FIX.4.4|9=230|35=UR|34=276|49=username|52=20140317-01:21:09|56=OEC_TEST|1=YRACCNT|702=3|55=ES|461=FXXXXS|200=201403|110=4|12066=5|55=ES|461=FXXXXS|200=201403|110=-5|12066=-4|55=OES|461=OCXFXS|200=201403|202=1600|110=1|12066=1|12064=635306160692759025|10=020|
Response:
8=FIX.4.4|9=155|35=UM|34=276|49=OEC_TEST|52=20140317-01:21:08.119|56=username|1=YRACCNT|12064=635306160692759025|12065=0|12067=9522.70|12068=8657.00|12069=12015.00|12070=5265.20|10=073|
Vitaliy Pfau


FIX Support » Margin request Jun 24, 2024 @ 12:56 PM (Total replies: 5)

>1)How is this script language used?
This is a console application that could execute your commands in interactive mode or you can provide foxscript as a parameter.
Examples of foxscript located here https://bitbucket.org/GainFuturesDev/oecfixsample/src/master/Tests/

>How to run commands, from the console? I installed in LINUX but nothing seems to work,
This is Windows console application based on .NETFramework 4.6.2; Dependencies located at ThirdParty/ are also Win based.

>I want to write a function to compute the margins of a given portfolio, and run it from python, if possible.
We do not support python.

>2)Is there any working example of margin calculation for a portfolio of 3 different futures in foxscript?
I did not find any but based on atg file the MarginCalc command defined as this:

https://bitbucket.org/GainFuturesDev/oecfixsample/src/master/FoxScript/FoxScript.atg#lines-400

Code example skipped due Forum restrictions.


which leads to syntax like
MarginCalc Account# Contract MinQty MaxQty, Custom Fields Assignment in form Tag=Value
Vitaliy Pfau


FIX Support » Tag not defined error in SecurityListRequest Jun 05, 2024 @ 02:02 PM (Total replies: 11)

Hello,

Accordingly to our documentation (https://gainfutures.com/GFAPI/?topic=html/7e7bc85a-5565-457e-817d-897ce7d7b818.htm) the SecurityList (35=y) (https://gainfutures.com/GFAPI/html/29915164-8494-4dcd-96f0-ac26f62436f6.htm) has Instrument component (https://gainfutures.com/GFAPI/html/ac43642d-de73-4af6-9449-d1ea323f063b.htm) that contains *optional* StrikePrice Tag (202). The dictionary for FIX protocol 4.4 matches our documentation.

...
<component name="Instrument">
<doc>
<summary>Contract specification</summary>
<remarks>
The most of fields are populated in respose to <see cref="message.SecurityListRequest"/> and <see cref="message.SecurityDefinitionRequest"/>.
But for contract identifying, only minimum set of fields required: <see cref="field.Symbol"/>, <see cref="field.CFICode"/>, <see cref="field.MaturityMonthYear"/>, <see cref="field.StrikePrice"/>
</remarks>
</doc>
<field name="Symbol" required="Y" />
<field name="EleSymbol" required="N" />
<field name="PitSymbol" required="N" />
<field name="CFICode" required="Y"/>
<field name="SecuritySubType" required="N" />
<field name="MaturityMonthYear" required="N" />
<field name="Factor" required="N" />
<field name="StrikePrice" required="N" />
...

The response message does not contains 202 but the dictionary check should pass it with no problem.
Unfortunately we cannot tell what is going on with your code as we have no visibility to it. The message rejected on a client side.

We see that you forcibly disconnect after SecurityList message and then connected again.

skipped...
010101-21:00:00.000|345=00010101-21:00:00.000|969=0.1|12054=Metals|12055=0|12059=GGC FTS +J26,-Z26|12063=1|12071=05|55=GGC FTS|461=FMXXXN|762=FutureTimeSpread|200=202508|228=100|207=COMEX|107=COM Gold Future Time Spread|15=USD|555=2|600=GGC|608=FXXXXS|610=202508|253=100|623=1|624=1|12061=GGCQ25|600=GGC|608=FXXXXS|610=202604|253=100|623=1|624=2|12061=GGCJ26|126=20250827-21:00:00.000|341=00010101-22:00:00.000|344=00010101-21:00:00.000|345=00010101-21:00:00.000|969=0.1|12054=Metals|12055=0|12059=GGC FTS +Q25,-J26|12063=1|12071=05|10=092|
02:27:05.874 FIX.4.4:OEC_TEST->ABandali:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 Session FIX.4.4:OEC_TEST->ABandali:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 disconnecting: Unexpected
02:27:10.455 FIX.4.4:OEC_TEST->ABandali:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 FIX.4.4:OEC_TEST->ABandali:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 Socket Reader 29482970 accepting session FIX.4.4:OEC_TEST->ABandali:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 from 103.244.178.144:33535
Vitaliy Pfau


FIX Support » Tag not defined error in SecurityListRequest Jun 04, 2024 @ 09:54 AM (Total replies: 11)

Hello,

The example is more than a month old. Please provide example that fits to last 30 days period.
Also add delimiters to you messages.

Thank you.
Vitaliy Pfau


FIX Support » Tag not defined error in SecurityListRequest May 31, 2024 @ 08:37 AM (Total replies: 11)

We are going to revisit published dictionaries and update them if necessary.

Until then please provide more information about your issue:
1. Your connection point and your user name. So we can identify problematic user session.
2. Log of FIX messages and what dictionary you use

That would be a good start point for investigation.
Vitaliy Pfau


API Support » GF API COM: Ability to Place Combo Orders Apr 17, 2023 @ 02:50 PM (Total replies: 2)

Hello

> Meaning is there a way that I can place an option order and a limit order at the same time?
Option is a contract type, limit is an order type. These categories do not overlap. An order can be option and limit at the same time.

Do you mean sending any random 2 orders as an one? If so, we do not support it. We have a custom compounds feature but such orders should follow some strategy rules to be accepted.
Vitaliy Pfau


API Support » DEMO server is slow Feb 21, 2023 @ 11:11 AM (Total replies: 3)

Can you please email to GFSupport@StoneX.com?

Thank you
Vitaliy Pfau


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