Function AccountSummaries(ByVal AccountID As Integer, ByRef Balance As Double, ByRef FltPL As Double, ByRef Credit As Double, ByRef Equity As Double,ByRef MarginReq As Double,ByRef MaginLevel As Double, ByRef EffMargin As Double) As VertexFXBOAPI.CallingResultsEnum
This function takes the ID of the desired account and returns a summary of the account details.
Note: you must Select Account at least one time and waiting the OpenPositionsLoaded or PendingOrdersLoaded events to get the summaries data.
||Associated account number to get the summaries for it , value of type Integer
||Real amount of money for the account.Value of type Double.
||Floating profit or loss for all open positions. Value of type Double
||An amount of money put to the account of a certain client in order to be a paid later.Value of type Double
||This equals to Balance+FLT P/L + Credit.Value of type Double.
||Called also Used margin which is the amount of money that can client afford in his account to buy 1 lot of certain currency.Value of type Double.
||This equals to (Equity/MarginReq) *100% (The bigger number ,the better).Value of type Double
||Called also Free Margin which equals to Equity+marginReq.Value of type Double.
Public WithEvents m_oBOAPI As New CVertexFXBOAPI
Public vAccount As COAccount
Private Sub GetAccountSummaries_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles GetAccountSummaries.Click
Dim vClient As COClient
vClient = m_oBOAPI.ClientByIndex(1)
vAccount = m_oBOAPI.AccountByIndex(vClient.ClientID,1)
Private Sub m_oBOAPI_OpenPositionsLoaded() Handles m_oBOAPI.OpenPositionAdded
Dim Balance As Double
Dim FlTP As Double
Dim Credit As Double
Dim Equity As Double
Dim MarginReq As Double
Dim MaginLevel As Double
Dim EffMargin As Double
m_oBOAPI.AccountSummaries(vAccount.AccountID, Balance, FlTP, Credit, Equity, MarginReq, MaginLevel, EffMargin)
MsgBox("Balance is :" & Balance & " MaginLevel :" & MaginLevel)
VertexFX Backoffice API Index