API Support Forum
User Profile

Viewing User Profile for: SPikalov



Nov 10, 2021 06:45 AM

Nov 10, 2021 06:47 AM

Post Statistics
SPikalov has contributed to 16 posts out of 5257 total posts

20 most recent posts:

API Support » Trouble Running bitbucket examples Nov 10, 2021 @ 06:45 AM (Total replies: 4)

It’s strange
Maybe something wrong with your Nuget Installer
Please check ‘basicexample\GF.BasicExample\packages.config’
It should contain:

package id="GFAPI" version="" targetFramework="net462"
package id="Microsoft.CSharp" version="4.5.0" targetFramework="net462"
package id="SimpleInjector" version="4.7.1" targetFramework="net462"
package id="System.Reflection.Emit" version="4.3.0" targetFramework="net462"

Also check ‘d:\projects\OEC\bitbucket\basicexample\packages’
This folder should contain: GFAPI., SimpleInjector.4.7.1, Microsoft.CSharp.4.5.0, System.Reflection.Emit.4.3.0

Edited by SPikalov on Nov 10, 2021 06:47 AM

API Support » Trouble Running bitbucket examples Nov 09, 2021 @ 04:08 AM (Total replies: 4)

Please install the last stable GFAPI Nuget package (https://www.nuget.org/packages/GFAPI/

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

The issue with the incorrect session time has already been fixed.
Please, download and install the latest version of GAIN GFAPI COM
x64: https://prod.gainfutures.com/WebAPI/api/Files/DownloadClientUpdateLast?brandId=0&clientTypeId=5005&branchId=2
x86: https://prod.gainfutures.com/WebAPI/api/Files/DownloadClientUpdateLast?brandId=0&clientTypeId=5003&branchId=2
And check again.


API Support » ModifyOrderDraftBuilder with price update Jun 02, 2021 @ 06:24 AM (Total replies: 1)

This may be due to the fact that prices must be a multiple of the contract TickSize
Which contract are you using?


API Support » GF COM API Prioritize Requests May 27, 2021 @ 01:58 AM (Total replies: 8)

I can advise you the following:
Send a subsequent request to contract load only after you have received a response to the previous one.

API Support » GF COM API Prioritize Requests May 26, 2021 @ 09:29 AM (Total replies: 8)

You are right, in some cases, the subsequent request is waiting for the processing of the previous ones.
Loading contracts is just such a case.
We do not currently support a prioritization mechanism for requests.
But we will consider the possibility of improving our system.


API Support » GF COM API Prioritize Requests May 24, 2021 @ 05:02 AM (Total replies: 8)

There is no direct connection between when you sent a request and when you received a response.
Our servers process your requests and return the result as soon as they are ready.
For example, there is no direct relationship between the processing speed of requests for contracts and orders.
“Is there a way I can send something through the api to prioritize my order request over my contract load requests?
Hope this makes sense.”
It doesn't make sense.


API Support » GF COM API Reconnecting on Socket Error Disconnection May 11, 2021 @ 05:31 AM (Total replies: 4)

Probably your issue here is that you are trying to call Connect from the Disconnected event handler.
You need to wait for the current process to complete.
For example, in “GF API COM C++ Sample” I did it like this:
void __stdcall CCppCOMSampleDlg::OnDisconnected(GF_Api_COM::DisconnectionReason reason, BSTR message)
std::thread::id this_id = std::this_thread::get_id();
CString string(message);
log << "Disconnected due to " << string <
//----Emulating the repeated click of the button by the user
HWND btnConnetHandle = GetDlgItem(IDC_CONNECT)-> GetSafeHwnd();
::PostMessage(btnConnetHandle, BM_CLICK, 0, 0);

API Support » GF COM API Reconnecting on Socket Error Disconnection May 06, 2021 @ 09:22 AM (Total replies: 4)

It is difficult to understand what went wrong, according to the available information.
Please provide a more detailed code example and UserName under which you connect.


API Support » OSO orders bug in COM API Feb 22, 2021 @ 12:11 AM (Total replies: 12)

“I see no way to otherwise distinguish real from fake.”
IOrder ParentOrder { get; }
IReadOnlyList SubOrders { get; }

IOrder ParentOrder { get; }
IOrderList SubOrders { get; }

“ So I guess my remaining question is: why are these fake orders coming through the API at all? What possible use could I on the client end have for them?”
You can work with both parent orders and sub-orders.
I.e. If you modify\cancel the parent order => sub orders will be modified\canceled corresponding way
If you modify\cancel sub orders => the parent order will be modified\canceled corresponding way

API Support » OSO orders bug in COM API Feb 11, 2021 @ 03:28 AM (Total replies: 12)

GF.Servers.Msgs.Values.Orders. OSOGroupingMethod

API Support » OSO orders bug in COM API Feb 11, 2021 @ 02:39 AM (Total replies: 12)

it’s not a bug it’s a feature :)
211862712 - this is a "fake" order that we use to group real orders
211862714 - this is a "real" or "sub" order that we send to an exchange. See order comment - ‘Sub order for 211862712’

Sub orders creation algorithm depends on the grouping method you choose. See GF.Servers.Msgs.Values.Orders. OSOGroupingMethod
In your case, it was OSOGroupingMethod. ByFirstPrice

211862713 -> 211862715
The same situation.

You can open the Trader app and submit OSO orders. I think after that you will understand the OSO algorithm more clearly

API Support » OSO orders bug in COM API Feb 10, 2021 @ 04:46 AM (Total replies: 12)


I repeated your test and found no trouble.
Please repeat the test and provide the account name and order IDs.


API Support » Auto-cenceled on trade sent using "Sample COM Book.xls" Nov 25, 2020 @ 04:40 AM (Total replies: 1)

At this time, there were two sessions under the user "ASykes4318" from different IP.

First session : AppTite ‘EXCEL’ – the order was created in this session at 2020-11-20 19:41:47 (UTC)
Second session: AppTite ‘MSACCESS’ - the order was canceled in this session at 2020-11-20 19:41:50 (UTC)

So, the cancel command was sent by the user "ASykes4318" from another app

Regards, Sergey

API Support » Too many requests message Sep 15, 2020 @ 10:27 AM (Total replies: 1)

var gfClient = GFApi.CreateClient();
gfClient.Traders.TraderError += (client, e) =>
string errorMessage = e.Message;

Best Regards,

API Support » Issue with OrderConfirmation Sep 03, 2020 @ 08:33 AM (Total replies: 5)

We cannot reproduce this situation and cannot find any reason in our code that could lead to a similar issue.
Please provide your source code, I hope this will help us understand the reasons for this issue.