API Support Forum
User Profile

Viewing User Profile for: VPfau


Oct 26, 2011 10:41 AM

Feb 03, 2022 07:27 AM

Feb 03, 2022 07:27 AM


Post Statistics
VPfau has contributed to 136 posts out of 5285 total posts (2.57%) in 3904 days (0.00 posts per day).

20 most recent posts:

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


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)


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?

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

API Support » Risk Violation Jun 23, 2021 @ 08:14 AM (Total replies: 2)

Hello VSiron,

Thank you to bring the question up. The Risk Violation error was moved to ITraderApi interface. It can be available thru IGFClient.Traders. To get this error your user has to be a trader manager and you need subscribe to ITradersApi.TraderError event.
For regular users the rejection reason can be fetched thru order status update.

We will update our documentation soon and add the feature request to our working queue.

Thank you
Vitaliy Pfau

API Support » C# API How to close position ? Jun 03, 2021 @ 12:53 PM (Total replies: 1)


>Is there a method to close a position?
No there is no close position method.

>I am using market orders to go to 0 lots
That's right.

>But market orders are sometimes refused because of insufficient margin.
Please call customer service to resolve margin problem.

Thank you
Vitaliy Pfau

API Support » OrderType Nov 27, 2020 @ 09:13 AM (Total replies: 1)

Hello VLuc,

I think you meant orders relations instead of order type?

If so, you need OCO and OSO links for orders. See One-Sends-Other (OSO) and One-Cancels-Other (OCO) section in Getting Started/Trading https://gainfutures.com/GFAPI/html/9900566b-260a-4247-8326-9698b013e7b8.htm

Also see SendLinkedOrders() and SendOCOOrders() functions
OCO usage at Advanced Example:
Vitaliy Pfau

API Support » New to the API, need some guidance Nov 20, 2020 @ 02:40 PM (Total replies: 4)

I don't see any issue to do automated trading thru the API. The only thing - you need to specify automated trades.
I'll ask our customer service answer the rest of questions

Vitaliy Pfau

API Support » New to the API, need some guidance Nov 20, 2020 @ 08:36 AM (Total replies: 4)

Hello JAstrahan,

We do not support python. I would recommend to contact the library's authors

Thank you
Vitaliy Pfau

API Support » Error: -2146233079 Descr: Price server not connected Nov 03, 2020 @ 07:34 AM (Total replies: 3)


No, it was forcible closed by the client side. That's how server reports disconnect in your case.
Without source code it's hard to say what is wrong

Please provide a source code of example that replicates the issue.

Thank you
Vitaliy Pfau

API Support » Error: -2146233079 Descr: Price server not connected Nov 02, 2020 @ 09:39 AM (Total replies: 3)

Hello Anthony,

I see your last connect was successful at 09:22:16.797 CT
All previous attempts were forcibly closed by remote host. Do you experience the same with our example?
Vitaliy Pfau

API Support » GF API Reconnect Nov 02, 2020 @ 08:53 AM (Total replies: 1)

Hello Jay,

With GFAPI it is application's responsibility to implement reconnect behavior. See reconnecter example in our documentation: (Useful Code Snippets\Reconnecter) https://gainfutures.com/GFAPI/html/da57e5d9-0be9-4b5c-a8c8-5e39e11b5c98.htm
Vitaliy Pfau

FIX Support » ERROR 0 (BROKER) Oct 29, 2020 @ 03:43 PM (Total replies: 1)


please provide the FIX message with rejection and where you connect to

Thank you
Vitaliy Pfau

API Support » ContractLoadRequest Returns in Reverse Order? Oct 29, 2020 @ 10:48 AM (Total replies: 3)

>Is there a way to see all of the contract months for a base contract using the symbol lookup?
yes, the SymbolLookupRequest ctor signature is

public SymbolLookupRequest(
int resultCount,
TextSearch symbol,
TextSearch description,
TextSearch baseSymbol,
ISymbolLookupExpression expression)

if you use SymbolLookupRequestBuilder you can use WithBaseSymbol function
Vitaliy Pfau

API Support » ContractLoadRequest Returns in Reverse Order? Oct 26, 2020 @ 08:12 AM (Total replies: 3)


ContractLoadApi meant that you need all data you requested. You can order the result on a client side.

>I'm wondering if there is a way to force it to return the most recent contracts first?
No, we don't have this function.

>For example if I were to do just request an amount of 1, it would not return the most recent contract.
Please use symbol lookup for this. Contract load is for bulk loading.
Else you can specify more details in load request such way that your result fits into limits
Vitaliy Pfau

FIX Support » FIX Connection Oct 01, 2020 @ 09:03 AM (Total replies: 4)

Hello MConcas,

Your application is not eligible to this connection. Please use UUID assigned to your application or, if you do not have it, contact our customer service.

Thank you
Vitaliy Pfau

API Support » List of Options Sep 21, 2020 @ 12:59 PM (Total replies: 1)

Hello DRyaboshapka,

Please take a look new snipped available here https://bitbucket.org/GainFuturesDev/workspace/snippets/aLnd95
Notice that this is a loading request which will load all available options for a future contract. If you know symbol of your option you will need symbol lookup like this:
client.Contracts.Lookup.BySymbol("OEW1V20 P4400") and catch response in client.Contracts.Lookup.SymbolLookupReceived event
Vitaliy Pfau

API Support » CONNECTION PROBLEM Sep 21, 2020 @ 08:25 AM (Total replies: 1)

Hello MConcas,

We have maintenance periods when there is no trading time.
Accepting connections and system stability are not guaranteed at such periods
Vitaliy Pfau

API Support » CONTRACT PROBLEM Sep 18, 2020 @ 07:47 AM (Total replies: 1)


By default we load only contracts which required by client side ei for which you have order or position. In all other cases you need lookup contract before use it.

See the file https://bitbucket.org/GainFuturesDev/basicexample/src/master/GF.BasicExample/Processors/ContractsProcessor.cs from our basic example repository
Vitaliy Pfau

API Support » Not Able to Build GF api Mar 30, 2020 @ 08:23 AM (Total replies: 4)

Class TicksReceivedEventArgs is in GF.API assembly.
Documentation for this class: https://gainfutures.com/GFAPI/html/T_GF_Api_Subscriptions_Ticks_TicksReceivedEventArgs.htm

Please take a look basic and advanced examples and their packages/references.
Vitaliy Pfau