Skip to main content

已實現損益查詢

realizedProfitAndLoses

輸入參數

參數類別說明
accountAccount帳號
start_datestring查詢起始日 ( YYYYMMDD )
end_datestring查詢結束日 ( YYYYMMDD )

Realized 欄位

Return type : Object

參數類別說明
noString編號
costString買入成本
incomeString賣出成本
profitLossString損益
profitLossRateString損益率
accumulatedCostString累計成本
accumulatedProfitLossString累計損益
accumulatedProfitLossRateString累計損益率
shortSellingFeeString融券手續費
interestString利息
closedMarginAmountString償還融資金額
dividendAmountString股利金額
securitiesLendingDifferentialFeeString券差借券費
profitLossSummaryArray損益摘要
└─ branchIdString分公司代號
└─ custIdString帳號
└─ nameString客戶姓名
└─ orderTypeString委託別 : 0 整股、1、3融資、2、4融券、 9現賣(擔保品)
└─ orderTypeNameString委託類型名稱
└─ buySellString買賣別 : BuySell : BuySell
└─ symbolString股票代號
└─ symbolNameString股票名稱
└─ targetPriceString標的現價
└─ portfolioTypeString權證種類 -
└─ noString編號
└─ tDateString交易日期
└─ orderNoString委託序號
└─ filledNoString成交序號
└─ closedQuantityString沖銷股數
└─ filledPriceString成交價格
└─ closedMarginAmountString償還融資金額
└─ closedShortCollateralString償還擔保品
└─ closedGuaranteeAmountString償還融券保證金
└─ interestString利息
└─ shortSellingFeeString借券費
└─ costString成本
└─ costBeforeDividendString成本 (不扣除息金額)
└─ incomeString賣出收入
└─ profitLossString損益
└─ profitLossRateString損益率
└─ otherCostString其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) )
└─ closeTypeString沖銷類別 : 0現股、1融資、2融券、3信用當沖、4現股當沖、5現賣(未買回)/券差(買進)
└─ securitiesTransactionTaxString證所稅
└─ healthInsurancePremiumString健保補充費
└─ orderTypeName2String委託類別名稱
└─ dividendAmountString除息金額
└─ securitiesLendingDifferentialFeeString券差借券費
└─ buyDetailObject買入詳情
  └─ filledQuantityString成交數量
  └─ filledAmountString成交金額
  └─ netAmountString淨收付
  └─ marginAmountString融資金額
  └─ guaranteeAmountString保證金金額
  └─ shortCollateralString融券擔保品
  └─ securitiesLendingFeeString標借費
  └─ adjustmentDateString調整日期
  └─ orderTypeString委託別 : 0 整股、1、3融資、2、4融券、 9現賣(擔保品)
  └─ orderTypeNameString委託類型名稱
  └─ buySellString買賣方向
  └─ changeTypeString變更類型
  └─ isAdjustedString是否開放調整成本
  └─ ioFlagString異動代碼
  └─ ioNameString異動名稱
  └─ noString編號
  └─ tDateString交易日期
  └─ orderNoString委託序號
  └─ filledNoString成交序號
  └─ closedQuantityString沖銷股數
  └─ filledPriceString成交價格
  └─ closedMarginAmountString償還融資金額
  └─ closedShortCollateralString償還擔保品
  └─ closedGuaranteeAmountString償還融券保證金
  └─ feeString手續費
  └─ interestString利息
  └─ taxString稅金
  └─ shortSellingFeeString借券費
  └─ costString成本
  └─ costBeforeDividendString成本 (不扣除息金額)
  └─ incomeString賣出收入
  └─ profitLossString損益
  └─ profitLossRateString損益率
  └─ otherCostString其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) )
  └─ closeTypeString沖銷類別 : 0現股、1融資、2融券、3信用當沖、4現股當沖、5現賣(未買回)/券差(買進)
  └─ securitiesTransactionTaxString證所稅
  └─ healthInsurancePremiumString健保補充費
  └─ orderTypeName2String委託類別
  └─ dividendAmountString除息金額
  └─ securitiesLendingDifferentialFeeString券差借券費
└─ SellDetailObject賣出詳情
  └─ filledQuantityString成交數量
  └─ filledAmountString成交金額
  └─ netAmountString淨收付
  └─ marginAmountString融資金額
  └─ guaranteeAmountString保證金金額
  └─ shortCollateralString融券擔保品
  └─ securitiesLendingFeeString標借費
  └─ adjustmentDateString調整日期
  └─ orderTypeString委託別 : 0 整股、1、3融資、2、4融券、 9現賣(擔保品)
  └─ orderTypeNameString委託類型名稱
  └─ buySellString買賣方向
  └─ changeTypeString變更類型
  └─ isAdjustedString是否開放調整成本
  └─ ioFlagString異動代碼
  └─ ioNameString異動名稱
  └─ noString編號
  └─ tDateString交易日期
  └─ orderNoString委託序號
  └─ filledNoString成交序號
  └─ closedQuantityString沖銷股數
  └─ filledPriceString成交價格
  └─ closedMarginAmountString償還融資金額
  └─ closedShortCollateralString償還擔保品
  └─ closedGuaranteeAmountString償還融券保證金
  └─ feeString手續費
  └─ interestString利息
  └─ taxString稅金
  └─ shortSellingFeeString借券費
  └─ costString成本
  └─ costBeforeDividendString成本 (不扣除息金額)
  └─ incomeString賣出收入
  └─ profitLossString損益
  └─ profitLossRateString損益率
  └─ otherCostString其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) )
  └─ closeTypeString沖銷類別 : 0現股、1融資、2融券、3信用當沖、4現股當沖、5現賣(未買回)/券差(買進)
  └─ securitiesTransactionTaxString證所稅
  └─ healthInsurancePremiumString健保補充費
  └─ orderTypeName2String委託類別
  └─ dividendAmountString除息金額
  └─ securitiesLendingDifferentialFeeString券差借券費

請求範例

sdk.accounting.realizedProfitAndLoses(account,"20241101","20241201");

回傳範例

{
no: "合計", // 編號 (String)
cost: "83618", // 買入總成本 (String)
income: "81462", // 賣出總收入 (String)
profitLoss: "-2156", // 總損益 (String)
profitLossRate: "-2.58%", // 總損益率 (String)
accumulatedCost: "0", // 累計成本 (String)
accumulatedProfitLoss: "-2156", // 累計損益 (String)
accumulatedProfitLossRate: "-2.58%", // 累計損益率 (String)
shortSellingFee: "0", // 融券手續費 (String)
interest: "0", // 利息 (String)
closedMarginAmount: "0", // 償還融資金額 (String)
dividendAmount: "0", // 股利金額 (String)
securitiesLendingDifferentialFee: "0", // 券差借券費 (String)
profitLossSummary: [
{
no: "1", // 編號 (String)
transactionDate: "20240808", // 交易日期 (String)
filledNo: "0000001", // 成交編號 (String)
closedQuantity: "1000", // 平倉數量 (String)
filledPrice: "81.70", // 成交價格 (String)
closedMarginAmount: "0", // 償還融資金額 (String)
closedShortCollateral: "0", // 償還擔保品 (String)
closedGuaranteeAmount: "0", // 償還保證金 (String)
interest: "0", // 利息 (String)
shortSellingFee: "0", // 融券費用 (String)
cost: "83618", // 買入成本 (String)
costBeforeDividend: "83618", // 買入成本 (未扣除股息) (String)
income: "81462", // 賣出收入 (String)
profitLoss: "-2156", // 損益 (String)
profitLossRate: "-2.58%", // 損益率 (String)
otherCost: "0", // 其他成本 (String)
closedType: "4", // 平倉類型 (String)
orderTypeName2: "現沖", // 委託類型名稱2 (String)
dividendAmount: "0", // 股息金額 (String)
securitiesLendingDifferentialFee: "0", // 券差借券費 (String)
branchId: "5920", // 分公司代號 (String)
customerId: "9816000", // 客戶帳號 (String)
customerName: "陳XXX", // 客戶姓名 (String)
orderType: "0", // 委託類型 (String)
orderTypeName: "現股", // 委託類型名稱 (String)
buySell: "Sell", // 買賣方向 (String)
symbol: "3663", // 股票代號 (String)
symbolName: "鑫科", // 股票名稱 (String)
targetPrice: "0", // 標的價格 (String)
portfolioType: "", // 投資組合類型 (String)
buyDetail: {
no: "1", // 編號 (String)
transactionDate: "20240808", // 交易日期 (String)
orderNo: "o0179", // 委託序號 (String)
filledNo: "0000002", // 成交編號 (String)
closedQuantity: "1000", // 平倉股數 (String)
filledPrice: "83.50", // 成交價格 (String)
closedMarginAmount: "0", // 償還融資金額 (String)
closedShortCollateral: "0", // 償還擔保品 (String)
closedGuaranteeAmount: "0", // 償還保證金 (String)
fee: "118", // 手續費 (String)
interest: "0", // 利息 (String)
tax: "0", // 稅金 (String)
shortSellingFee: "0", // 融券費用 (String)
cost: "83618", // 買入成本 (String)
costBeforeDividend: "83618", // 買入成本 (未扣除股息) (String)
income: "81462", // 賣出收入 (String)
profitLoss: "-2156", // 損益 (String)
profitLossRate: "-2.58%", // 損益率 (String)
otherCost: "0", // 其他成本 (String)
closedType: "4", // 平倉類型 (String)
securitiesTransactionTax: "0", // 證券交易稅 (String)
healthInsurancePremium: "0", // 健保費用 (String)
orderTypeName2: "買沖", // 委託類型名稱2 (String)
dividendAmount: "0", // 股息金額 (String)
securitiesLendingDifferentialFee: "0", // 券差借券費 (String)
filledQuantity: "1000", // 成交數量 (String)
filledAmount: "83500", // 成交金額 (String)
netAmount: "-83618", // 淨支付金額 (String)
marginAmount: "0", // 融資金額 (String)
guaranteeAmount: "0", // 保證金金額 (String)
shortCollateral: "0", // 融券擔保品 (String)
securitiesLendingFee: "0", // 證券借貸費用 (String)
adjustmentDate: "", // 調整日期 (String)
orderType: "0", // 委託類型 (String)
orderTypeName: "現股", // 委託類型名稱 (String)
buySell: "B", // 買賣方向 (String)
changeType: "0", // 變更類型 (String)
isAdjusted: "N", // 是否已調整 (String)
ioFlag: "", // 異動代碼 (String)
ioName: "" // 異動名稱 (String)
},
sellDetail: {
no: "1", // 編號 (String)
transactionDate: "20240808", // 交易日期 (String)
orderNo: "g0050", // 委託序號 (String)
filledNo: "0000001", // 成交編號 (String)
closedQuantity: "1000", // 平倉股數 (String)
filledPrice: "81.70", // 成交價格 (String)
closedMarginAmount: "0", // 償還融資金額 (String)
closedShortCollateral: "0", // 償還擔保品 (String)
closedGuaranteeAmount: "0", // 償還保證金 (String)
fee: "116", // 手續費 (String)
interest: "0", // 利息 (String)
tax: "122", // 稅金 (String)
shortSellingFee: "0", // 融券費用 (String)
cost: "0", // 成本 (String)
costBeforeDividend: "0", // 成本 (未扣除股息) (String)
income: "81462", // 賣出收入 (String)
profitLoss: "0", // 損益 (String)
profitLossRate: "100.00%", // 損益率 (String)
otherCost: "0", // 其他成本 (String)
closedType: "4", // 平倉類型 (String)
securitiesTransactionTax: "0", // 證券交易稅 (String)
healthInsurancePremium: "0", // 健保費用 (String)
orderTypeName2: "賣沖", // 委託類型名稱2 (String)
dividendAmount: "0", // 股息金額 (String)
securitiesLendingDifferentialFee: "0", // 券差借券費 (String)
filledQuantity: "1000", // 成交數量 (String)
filledAmount: "81700", // 成交金額 (String)
netAmount: "81462", // 淨收入金額 (String)
marginAmount: "0", // 融資金額 (String)
guaranteeAmount: "0", // 保證金金額 (String)
shortCollateral: "0", // 融券擔保品 (String)
securitiesLendingFee: "0", // 證券借貸費用 (String)
adjustmentDate: "", // 調整日期 (String)
orderType: "0", // 委託類型 (String)
orderTypeName: "現股", // 委託類型名稱 (String)
buySell: "S", // 買賣方向 (String)
changeType: "", // 變更類型 (String)
isAdjusted: null, // 是否已調整 (null 或 String)
ioFlag: "", // 異動代碼 (String)
ioName: "" // 異動名稱 (String)
}
}
]
}