API Key Login
apikey_login
Version Info
New feature added in v2.2.7 (C++ requires v2.5.0 or later)
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| personal_id | String | Login ID |
| api_key | String | Applied API Key |
| cert_path | String | Certificate path |
| cert_pass | String (optional) | Certificate password |
Result Response
| Parameter | Type | Description |
|---|---|---|
| is_success | bool | Whether the login was successful |
| data | List | Returned account information |
| message | string | Error message when is_success = False |
Account Information Fields
Return type: Object
| Parameter | Type | Description |
|---|---|---|
| name | String | Customer name |
| account | String | Customer account number |
| branch_no | String | Branch code |
| account_type | string | Account type: returns stock for securities, futopt for futures |
Request Example
std::shared_ptr<fubon::FubonSDK> sdk = std::make_shared<fubon::FubonSDK>();
fubon::LoginResponse res = sdk->apikey_login("PersonalID", "Key", "Cert Path", "Cert Password");
Response Example
// Custom .cpp & .hpp Output
{
is_success = true,
message = ,
data = [
Account{
name = Fubon Bill, // Customer name (string)
account = 28, // Customer account number (string)
branch_no = 6460, // Branch code (string)
account_type = stock // Account type (string)
}
]
}