Skip to main content

API Key Login

ApikeyLogin

Version Requirement

New feature added in version 2.2.7

Input Parameters

ParameterTypeDescription
personalIDStringLogin ID
keyStringApplied API Key
certPathStringCertificate Path
certPassStringCertificate Password

Result Return

ParameterTypeDescription
isSuccessboolWhether the login was successful
dataListReturns account information
messagestringReturns error message when isSuccess = False

Account Information Fields

Return type : Object

ParameterTypeDescription
nameStringClient Name
accountStringClient Account
branchNoStringBranch Code
accountTypestringAccount Type. Returns stock for Securities, futopt for Futures/Options

Request Example

	loginResp, err := sdk.ApikeyLogin(personalId, key, certPath, &certPass)
if err != nil {
fmt.Printf("❌ Login Format/Parse Error: %v (Type: %T)\n", err, err)
return
}

if loginResp.IsSuccess {
fmt.Println("✓ Login successful!")

} else {
fmt.Printf("❌ Login failed: %s\n", *loginResp.Message)
return
}

Response Example

{
isSuccess = true,
message = ,
data = [
Account{
name = Fubon Bill, // Client Name (string)
account = 28, // Client Account (string)
branchNo = 6460, // Branch Code (string)
accountType = stock // Account Type (string)
}
]
}