API Support Forum
OEC API > API Support > Understanding Opening or Closing during fill notification
Author Topic: Understanding Opening or Closing during fill notification
(2 messages, Page 1 of 1)
Moderators: VPfau
RAhlander
Posts: 13
Joined: Jul 13, 2023


Posted: May 24, 2024 @ 06:38 PM             Msg. 1 of 2
Hello,

Is there a way to tell if a Fill is off-setting a current position or opening a net new position?

I'm subscribing to the event:

E.g.
IGFClient.Orders.OrderFilled += orderFilled;

Is there a way to tell with the information in OrderFilledEventArg if the fill was an offset or net new?

Thanks
JHyatt8720
Posts: 5
Joined:


Posted: Jun 10, 2024 @ 02:37 PM             Msg. 2 of 2
No, not specifically in that area, but you can try listening to PositionChangedEventArgs.ContractPosition.Fills.Last().SourcePreviousPosition, and look at ContractPositon.Net, these both return a VolPrice containing information which you can compare like volume.