API Support Forum
OEC API > Market Data > Margin Calculation event dont work correctly
Author Topic: Margin Calculation event dont work correctly
(2 messages, Page 1 of 1)
Moderators: VPfau
JKovalcin926
Posts: 8
Joined: Jan 24, 2022


Posted: Aug 02, 2022 @ 11:44 AM             Msg. 1 of 2
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
JSmith5611
Posts: 172
Joined: Aug 11, 2015


Posted: Sep 07, 2022 @ 02:44 PM             Msg. 2 of 2
What is the e object in this case?
Jason Smith