Skip to main content

API Key 登入

apikey_login

版本資訊

v2.2.7 起新增功能(C++ 需 v2.5.0 以上)

輸入參數​

參數類別說明
personal_idString登入的 ID
api_keyString申請的 API Key
cert_pathString憑證路徑
cert_passString (optional)憑證密碼

Result 回傳​

參數類別說明
is_successbool是否成功
dataList回傳帳號資訊
messagestring當 is_success = False 回傳錯誤訊息

帳號資訊 Account 欄位​

Return type : Object

參數類別說明
nameString客戶姓名
accountString客戶帳號
branch_noString分公司代號
account_typestring帳號類型 回傳 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)
}
]
}