Posted by Mohammad Rahhal, Last modified by Angham Al-Banawien on 10 July 2017 02:55 PM


 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.


Part Description 
AccountID Associated account number to get the summaries for it , value of type Integer
Balance Real amount of money for the account.Value of type Double.
FltPL Floating profit or loss for all open positions. Value of type Double
Credit An amount of money put to the account of a certain client in order to be a paid later.Value of type Double
Equity This equals to Balance+FLT P/L + Credit.Value of type Double.
MarginReq 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.
MarginLevel This equals to (Equity/MarginReq) *100% (The bigger number ,the better).Value of type Double
EffMargin 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)

End Sub 

 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)

 End Sub 

See Also

VertexFX Backoffice API Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions