Skip to main content

登入

apikey_login

版本資訊

v2.2.7 起新增功能

相關說明請參閱 API Key 說明 頁面

輸入參數

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

Result 回傳

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

帳號資訊 Account 欄位

Return type: Object

參數類別說明
nameString客戶姓名
accountString客戶帳號
branch_noString分公司代號
account_typestring帳號類型 回傳 stock 證券 futopt 期貨

請求範例

from fubon_neo.sdk import FubonSDK, Order
from fubon_neo.constant import TimeInForce, OrderType, PriceType, MarketType, BSAction

sdk = FubonSDK()

accounts = sdk.apikey_login("Your ID", "Your KEY","Your Cert Path","Your Cert Password")

print(accounts) #若有多帳號,則回傳多個

回傳範例

Result {
is_success: True,
message: None,
data : Account{
name : "富邦Bill", # 客戶姓名 (string)
account : "28", # 客戶帳號 (string)
branch_no : "6460", # 分公司代號 (string)
account_type : "stock" # 帳號類型 (string)
}
}