API Key 登入
apikey_login
版本資訊
v2.2.7 起新增功能(C++ 需 v2.5.0 以上)
輸入參數
| 參數 | 類別 | 說明 |
|---|---|---|
| personal_id | String | 登入的 ID |
| api_key | String | 申請的 API Key |
| cert_path | String | 憑證路徑 |
| cert_pass | String (optional) | 憑證密碼 |
Result 回傳
| 參數 | 類別 | 說明 |
|---|---|---|
| is_success | bool | 是否成功 |
| data | List | 回傳帳號資訊 |
| message | string | 當 is_success = False 回傳錯誤訊息 |
帳號資訊 Account 欄位
Return type : Object
| 參數 | 類別 | 說明 |
|---|---|---|
| name | String | 客戶姓名 |
| account | String | 客戶帳號 |
| branch_no | String | 分公司代號 |
| account_type | string | 帳號類型 回傳 stock 證券 futopt 期貨 |
請求範例
std::shared_ptr<fubon::FubonSDK> sdk = std::make_shared<fubon::FubonSDK>();
fubon::LoginResponse res = sdk->apikey_login("PersonalID", "Key", "Cert Path", "Cert Password");
回傳範例
// 搭配自定義 .cpp & hpp Output
{
is_success = true,
message = ,
data = [
Account{
name = 富邦Bill, // 客戶姓名 (string)
account = 28, // 客戶帳號 (string)
branch_no = 6460, // 分公司代號 (string)
account_type = stock // 帳號類型 (string)
}
]
}