Skip to main content

登入

apikeyLogin

版本資訊

v2.2.7 起新增功能

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

輸入參數

參數類別說明
personalIDString登入的ID
keyString申請的 API Key
certPathString憑證路徑
certPassString憑證密碼

Result 回傳

參數類別說明
isSuccessbool是否成功
dataObject回傳帳號資訊
messagestring ? (optional)當isSuccess = false 回傳錯誤訊息

帳號資訊 Account 欄位

Return type : Object

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

請求範例

const { FubonSDK, BSAction, TimeInForce, OrderType, PriceType, MarketType } = require('fubon-neo');

const sdk = new FubonSDK();

const accounts = sdk.apikeyLogin("Your ID", "Your Key","Your Cert Path","Your Cert Password");

Console.log(accounts);

回傳範例

{
isSuccess: true,
data:
{
name: '富邦Bill', // 客戶姓名 (string)
account: '28', // 客戶帳號 (string)
branchNo: '6460', // 分公司代號 (string)
accountType: 'stock' // 帳號類型 (string)
}
}