API Support Forum
User Profile

Viewing User Profile for: JKovalcin926


About

Jan 24, 2022 06:26 PM

Aug 02, 2022 11:44 AM

Aug 03, 2022 02:30 PM



Post Statistics
JKovalcin926 has contributed to 4 posts out of 5321 total posts (0.08%) in 199 days (0.00 posts per day).

20 most recent posts:

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

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: 0)

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