Topic: Getting real time position value
(2 messages, Page 1 of 1)
Joined: May 19, 2020
I need to get actual position (Volume) for the contract at Client.Orders.OrderFilled event.
I was using old API, which used to return the position with order.Account.AvgPositions[fill.Contract].Net.Volume
But with most recent API it does not return a correct actual position.
Looks like DetailedPositions returns correct value, but I am not sure.
What would be the best way to get actual position, including overnight?
My app is used by the IB and it has many subaccounts.
Joined: Aug 24, 2017
One change in GFAPI is that you need to subscribe to the contracts in the position in order to get an accurate position. Perhaps this is the issue?
Here is a sample for doing so: https://gainfutures.com/GFAPI/html/de577afb-edad-4021-a3cc-1fd943896903.htm