Syntax
Public Function AccountSummaries(AccountId As Integer, ByRef Balance As Double, ByRef FltPL As Double, ByRef Credit As Double, ByRef Equity As Double, ByRef MarginReq As Double, ByRef MarginLevel As Double, ByRef EffMargin As Double) As VertexFXClientAPI.CallingResultsEnum
Description
This function takes the ID of the desired account and returns a summary of the account details. You must Select Account at least one time and waiting the OpenPositionsLoaded or PendingOrdersLoaded event to get the summaries data.
Parameters
Part |
Description |
AccountID |
Associated Account ID, value of type Integer, |
Balance |
Real amount of money a client has in his account., value of type Double |
FltPL |
The profit/loss the client gains or looses respectively , 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. |
Return value
Returns value of type CallingResultsEnum.If the request sent to the server successfully it will return SuccessResult
Sample
Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As VertexFXClientAPI.CallingResultsEnum
'API is a predefined variable as CVertexFXClientAPI
result = API.AccountSummaries(123456789, balance, fltPL, credit, equity, marginReq,
marginLevel, effMargin)
MsgBox("The balance :" & balance & " the equity:" & equity)
End Sub
See Also
VertexFX Client API Index
|