API Support Forum
User Profile

Viewing User Profile for: JKovalcin926


About

Jan 24, 2022 06:26 PM

Dec 09, 2022 11:05 AM

Dec 14, 2022 07:46 PM



Post Statistics
JKovalcin926 has contributed to 9 posts out of 5677 total posts (0.16%) in 1070 days (0.00 posts per day).

20 most recent posts:

Market Data » receive flag from Admin cancel pending order Dec 09, 2022 @ 11:05 AM (Total replies: 1)

Hello, good day

We want to implement the following use cases:
-Admin Cancel
-Admin Modify
-Admin Liquidity
and recognize from the GF API that it was the admin who made the use case and not our software by client-side
Could you tell me how it could be done?

thanks for advanced

Market Data » Marginrequest does not always respond Sep 23, 2022 @ 12:20 PM (Total replies: 7)

I understand, but we are requesting the contractID before MarginRequest. here is a sample of code vs console

------> GFClient_OnSymbolLookupReceived( IGFClient client, SymbolLookupEventArgs e ) <--------------
Console.WriteLine($"Contract: {e.Contracts.First().Symbol} - {e.Contracts.First().BaseSymbol} - ID: {e.Contracts.First().ID.Value} - is pit {e.Contracts.First().ID.IsPit}");
...
GF.Api.Accounts.AccountID accountID = client.Accounts.Get().First().ID;
HypoPosition position = new HypoPosition(e.Contracts.First().ID, 1, 1);
HypoOrder order = new HypoOrder(e.Contracts.First().ID, GF.Api.Values.Orders.OrderSide.Buy, 1);
...

17:12:36:724 Contract: ESZ22 - ES - ID: 280192539 - is pit False
17:12:36:806 Added Symbol:ESZ22 to Request Margin Event -- validaMarginCalculationRequest Sucessful
[Traders_TraderError event] Contract is not subscribed or not found for Margin Calculator request
Edited by JKovalcin926 on Sep 23, 2022 12:23 PM
Edited by JKovalcin926 on Sep 23, 2022 12:26 PM

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

Thank you very much for your answer, I have a few points to share:
* MEZ22 is not found because I wrote it wrong in this forum, sorry. It is the MESZ22. So with that part there is no problem.
* I wasn't using that event, thanks. Continuing with the thread of not receiving ESZ22, the new event returned the following message:

"[Traders_TraderError event] Contract is not subscribed or not found for Margin Calculator request".

I was going through the bitbucket example and this is how I am using it.
Edited by JKovalcin926 on Sep 23, 2022 10:43 AM

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

Hi VPfau, of course

The account name is JKovalcin926, GFAPI version 4.0.3.44
The code is i use is the following:

GF.Api.Accounts.AccountID accountID = client.Accounts.Get().First().ID;
HypoPosition position = new HypoPosition(e.Contracts.First().ID, 1, 1);
HypoOrder order = new HypoOrder(e.Contracts.First().ID, GF.Api.Values.Orders.OrderSide.Buy, 1);

List listPosition = new List();
listPosition.Add(position);
List listOrder = new List();
listOrder.Add(order);

IReadOnlyList datapositions = listPosition;
IReadOnlyList dataorders = listOrder;

MarginCalculationRequest marginRequest = new MarginCalculationRequest(accountID, datapositions, dataorders);

string validation = client.Margin.ValidateMarginCalculationRequest(marginRequest);
if (string.IsNullOrEmpty(validation))
{
int response = client.Margin.RequestMarginCalculation(marginRequest);
symbolData.requestID = response;
}

Thanks for advanced

Market Data » Marginrequest does not always respond Sep 20, 2022 @ 02:57 PM (Total replies: 7)

It turns out that the GF API does not respond to a percentage of the MarginRequests that we make. We have taken special care to validate the request, implement waiting times, verify that the contract is valid, among others.
But we don't get the event for everyone.

For example, "ESZ22" or "MEZ22" we have tried to apply it since Sept/12/2022 2 times per day but the event has not been triggered yet. But it does work for others like 6JX22, BTCX22, GFV22, M6AZ22, NKDZ22 and others.

The rest works fine with all symbols except the MarginRequest

Could you help us?


Thank you very much in advanced

Market Data » Margin Calculation event dont work correctly Aug 02, 2022 @ 11:44 AM (Total replies: 1)

Hello!
I am getting a number of symbols from the GFApi correctly, but when performing the RequestMarginCalculation the only events I receive are for the ESU22, MESU22 and occasionally GGCQ22 symbols.
But I don't get any margin event after that.
* I use ValidateMarginCalculationRequest to validate the request previously and it's OK
* get an ID from RequestMarginCalculation

for the request I use:
GF.Api.Accounts.AccountID accountID = client.Accounts.Get().First().ID;
HypoPosition position = new HypoPosition(e.Contracts.First().ID, 1, 1);
HypoOrder order = new HypoOrder(e.Contracts.First().ID, GF.Api.Values.Orders.OrderSide.Buy, 1);

List listPosition = new List();
listPosition.Add(position);
List listOrder = new List();
listOrder.Add(order);

IReadOnlyList datapositions = listPosition;
IReadOnlyList dataorders = listOrder;

MarginCalculationRequest marginRequest = new MarginCalculationRequest(accountID, datapositions, dataorders);

I will be grateful if you help us with that

Market Data » Pagination of symbols - ByCriteria Aug 02, 2022 @ 11:42 AM (Total replies: 2)

Thanks a lot

Market Data » Pagination of symbols - ByCriteria Jul 25, 2022 @ 04:54 PM (Total replies: 2)

hi, we want to get the list of all futures symbols, we already make the request but we have the maximum limit of 50 results.
Could you help me with indications or examples of how to paginate to obtain them all?

I attach the code fragment of the request and the list obtained
Thanks for advanced

***************************************************************************************
List listaTipo = new List();
listaTipo.Add(ContractKind.Future);
IReadOnlyList listaOnlyRead = listaTipo;

var _esRequestID = client.Contracts.Lookup.ByCriteria(
new SymbolLookupRequestBuilder()
.WithResultCount(50)
.WithSymbol("", TextSearchMode.AnyInclusion)
.WithExpression(new ContractKindsCriterion(GetSelectedContractKinds().ToList().AsReadOnly())).Build());

***************************************************************************************
private static void GFClient_OnSymbolLookupReceived(IGFClient client, SymbolLookupEventArgs e)
{
foreach (var contract in e.Contracts)
{
Console.WriteLine("received:" + contract.Symbol);
}
}

***************************************************************************************

Market Data » Get Margin Values Jul 15, 2022 @ 03:05 PM (Total replies: 1)

Hello good day
We are currently working with GF API and C#
We want to get the margin values of some futures symbols, but at the moment what we receive does not match what the calculator gives us.
We carry out the following process:
* gateway initialization
* OnSymbolLookupReceived event trigger
* margin request with RequestMarginCalculation
* Triggering the OnMarginCalculationCompleted event and reading the MarginCalculationResult.

and for each symbol, with a Qty:1 we get the following:

https://postimg.cc/nXLVkQHt

https://postimg.cc/K1sGsvz3

Could you guide us about this deviation of values?
Thanks in advance