Author |
Topic: Getting Total Active Position on a Symbol (2 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
BFeddish Posts: 7 Joined: Aug 07, 2015 |
Is there a way to get a total active position on a symbol for a particular account or do I have to loop through the positions?
Thanks, Bryan Brayn Feddish |
||||
NShine Posts: 36 Joined: |
Your total positions should be available by looking into your Account.AvgPositions property.
http://futures.gaincapital.com/api/api/html/P_OEC_API_Account_AvgPositions.htm After selecting the desired contract from this list, you can view your Long, Short, and Net positions (as well as many other Position properties). http://futures.gaincapital.com/api/api/html/AllMembers_T_OEC_API_Position.htm You might also be interested in the OnAvgPositionChanged event which gets called whenever a value within your average positions is changed. http://futures.gaincapital.com/api/api/html/E_OEC_API_OECClient_OnAvgPositionChanged.htm Please refer to the "Advanced API Example" in our Samples to see implementation of the above items, specifically the AveragePositionsControl.cs file. http://futures.gaincapital.com/trading/api/documentation.cfm |
||||