Syntax
Public Function CreateAccount(Username As String, AccountID As Integer, AccountType As AccountTypeEnum, Time As String, DemoAccount As Boolean, LockedAccount As Boolean, DontLiquidate As Boolean, MarginAccount As Boolean, TransTag As String,Optional ParentUserID as Integer = -1) As CallingResultsEnum
Description
To make a new account for a specific client.After CreateAccount method executes the CreateAccountResult event fire.
Parameters
Part |
Description |
Username |
Client Login Username, whom you want to create the account for,value of type String. |
AccountID |
Account number, put 0 to generate ID automatically |
AccountType |
The type of the Account, value of type AccountTypeEnum. |
Time |
Creation time , value of type String. |
DemoAccount |
true if account Type= DemoAccountType ,value of type Boolean |
LockedAccount |
If true the account will be locked ,value of type Boolean. |
DontLiquidate |
Don't liquidate when reach liquidation point ,value of type Boolean |
MarginAccount |
If true the account is a margin account , value of type boolean. |
TransTag |
String value is used to mark the create account operation when the result came from server. |
ParentUserID |
If the username is empty you can pass the parent Id that you want to create the account, an optional value of type is Integer |
Return value
Returns a value of type CallingResultsEnum. if the requested sent to the server successfully it will return SuccessResult.
Sample
Public WithEvents m_oBOAPI As CVertexFXBOAPI
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As CallingResultsEnum
Dim AccID As Integer
AccID = "12345678"
Dim ParentUsername as String = "ParentUsername" ' change it with your parent user name
Dim ParentUserID as Integer = -1
result = m_oBOAPI.CreateAccount(ParentUsername , AccID, VertexGeneral11.AccountTypeEnum.DemoAccountType, Now, True, False, False, True,ParentUserID )
MsgBox(result.ToString)
End Sub
Private Sub m_oBOAPI_CreateAccountResult(ByRef Result As VertexFXBOAPI11.CreateAccountResultEnum, ByRef tag As String) Handles m_oBOAPI.CreateAccountResult
MsgBox(result.ToString)
End Sub
See Also
VertexFX Backoffice API Index
|