Knowledgebase: > Methods
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 09 September 2020 10:21 AM


 Function SelectAccount(ByRef AccountID As Integer) As CallingResultsEnum


To choose which account that want to load its pending orders and open positions .
Note that an account must be selected before performing any operation such as making a new market order or closing a market order


Part Description 
AccountID Associated Account number that want to access,value of type Integer


If you want to know the result of SelectAccount you have to assign it to a variable of type CallingResultsEnum.
You cannot call NewLimitOrder and NewSLTPOrder methods before calling this method.


 Public WithEvents m_oBOAPI As CVertexFXBOAPI

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim vAccount As COAccount

        Dim vClient As COClient

        Dim AccountID As Integer

        vClient = m_oBOAPI.ClientByIndex(1)

        vAccount = m_oBOAPI.AccountByIndex(vClient.ClientID,1)

        AccountID = vAccount.AccountID 

        Dim result As VertexFXBOAPI10.CallingResultsEnum

        result = m_oBOAPI.SelectAccount(AccountID)


   End Sub

     Private Sub m_oBOAPI_OpenPositionsLoaded() Handles m_oBOAPI.OpenPositionsLoaded

         MsgBox("Open positions were loaded")

     End Sub

See Also

VertexFX Backoffice API Index

(1 vote(s))
Not helpful

Comments (2)
full name
30 April 2013 09:54 AM
AccountID of type integer to recognize witch account of the client you want ...
----------------------------------------------------- which ---------------------------- you want ...
correct it ^_^
Yousef Ibrahim
30 April 2013 02:57 PM
Thanks for the correction.
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