API Support Forum
OEC API > API Support > Balance Buying Power
Author Topic: Balance Buying Power
(4 messages, Page 1 of 1)
Moderators: VPfau
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Jul 22, 2008 @ 07:21 PM             Msg. 1 of 4
I would like to know how the "Buying Power" is calculated in the Trader Developer.

Is there a value for this from the api, or are you calculating it from open positions and margin on those positions?
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jul 23, 2008 @ 08:30 AM             Msg. 2 of 4
Buying Power is calculated as
bal.NetLiquidatingValue - bal.SettlePnL + bal.OpenPnL - bal.InitialMargin;

where bal is Account.TotalBalance
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Jul 23, 2008 @ 12:14 PM             Msg. 3 of 4
After I have a position longer than a day, does the calculation need to change to take 'bal.MaintenanceMargin' into account and not initialMargin?
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Aug 12, 2008 @ 08:30 AM             Msg. 4 of 4
we currently do not change the calculation.