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

Posted: Aug 02, 2022 @ 11:44 AM             Msg. 1 of 1
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();
List listOrder = new List();

IReadOnlyList datapositions = listPosition;
IReadOnlyList dataorders = listOrder;

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

I will be grateful if you help us with that