已實現損益查詢
realizedProfitAndLoses
輸入參數
參數 | 類別 | 說明 |
---|---|---|
account | Account | 帳號 |
start_date | string | 查詢起始日 ( YYYYMMDD ) |
end_date | string | 查詢結束日 ( YYYYMMDD ) |
Realized 欄位
Return type : Object
參數 | 類別 | 說明 |
---|---|---|
no | String | 編號 |
cost | String | 買入成本 |
income | String | 賣出成本 |
profitLoss | String | 損益 |
profitLossRate | String | 損益率 |
accumulatedCost | String | 累計成本 |
accumulatedProfitLoss | String | 累計損益 |
accumulatedProfitLossRate | String | 累計損益率 |
shortSellingFee | String | 融券手續費 |
interest | String | 利息 |
closedMarginAmount | String | 償還融資金額 |
dividendAmount | String | 股利金額 |
securitiesLendingDifferentialFee | String | 券差借券費 |
profitLossSummary | Array | 損益摘要 |
└─ branchId | String | 分公司代號 |
└─ custId | String | 帳號 |
└─ name | String | 客戶姓名 |
└─ orderType | String | 委託別 : 0 整股、1、3 融資、2、4 融券、 9 現賣(擔保品) |
└─ orderTypeName | String | 委託類型名稱 |
└─ buySell | String | 買賣別 : Buy 、Sell : Buy 、Sell |
└─ symbol | String | 股票代號 |
└─ symbolName | String | 股票名稱 |
└─ targetPrice | String | 標的現價 |
└─ portfolioType | String | 權證種類 - |
└─ no | String | 編號 |
└─ tDate | String | 交易日期 |
└─ orderNo | String | 委託序號 |
└─ filledNo | String | 成交序號 |
└─ closedQuantity | String | 沖銷股數 |
└─ filledPrice | String | 成交價 格 |
└─ closedMarginAmount | String | 償還融資金額 |
└─ closedShortCollateral | String | 償還擔保品 |
└─ closedGuaranteeAmount | String | 償還融券保證金 |
└─ interest | String | 利息 |
└─ shortSellingFee | String | 借券費 |
└─ cost | String | 成本 |
└─ costBeforeDividend | String | 成本 (不扣除息金額) |
└─ income | String | 賣出收入 |
└─ profitLoss | String | 損益 |
└─ profitLossRate | String | 損益率 |
└─ otherCost | String | 其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) ) |
└─ closeType | String | 沖銷類別 : 0 現股、1 融資、2 融券、3 信用當沖、4 現股當沖、5 現賣(未買回)/券差(買進) |
└─ securitiesTransactionTax | String | 證所稅 |
└─ healthInsurancePremium | String | 健保補充費 |
└─ orderTypeName2 | String | 委託類別名稱 |
└─ dividendAmount | String | 除息金額 |
└─ securitiesLendingDifferentialFee | String | 券差借券費 |
└─ buyDetail | Object | 買入詳情 |
└─ filledQuantity | String | 成交數量 |
└─ filledAmount | String | 成交金額 |
└─ netAmount | String | 淨收付 |
└─ marginAmount | String | 融資金額 |
└─ guaranteeAmount | String | 保證金金額 |
└─ shortCollateral | String | 融券擔保品 |
└─ securitiesLendingFee | String | 標借費 |
└─ adjustmentDate | String | 調整日期 |
└─ orderType | String | 委託別 : 0 整股、1、3 融資、2、4 融券、 9 現賣(擔保品) |
└─ orderTypeName | String | 委託類型名稱 |
└─ buySell | String | 買賣方向 |
└─ changeType | String | 變更類型 |
└─ isAdjusted | String | 是否開放調整成本 |
└─ ioFlag | String | 異動代碼 |
└─ ioName | String | 異動名稱 |
└─ no | String | 編號 |
└─ tDate | String | 交易日期 |
└─ orderNo | String | 委託序號 |
└─ filledNo | String | 成交序號 |
└─ closedQuantity | String | 沖銷股數 |
└─ filledPrice | String | 成交價格 |
└─ closedMarginAmount | String | 償還融資金額 |
└─ closedShortCollateral | String | 償還擔保品 |
└─ closedGuaranteeAmount | String | 償還融券保證金 |
└─ fee | String | 手續費 |
└─ interest | String | 利息 |
└─ tax | String | 稅金 |
└─ shortSellingFee | String | 借券費 |
└─ cost | String | 成本 |
└─ costBeforeDividend | String | 成本 (不扣除息金額) |
└─ income | String | 賣出收入 |
└─ profitLoss | String | 損益 |
└─ profitLossRate | String | 損益率 |
└─ otherCost | String | 其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) ) |
└─ closeType | String | 沖銷類別 : 0 現股、1 融資、2 融券、3 信用當沖、4 現股當沖、5 現賣(未買回)/券差(買進) |
└─ securitiesTransactionTax | String | 證所稅 |
└─ healthInsurancePremium | String | 健保補充費 |
└─ orderTypeName2 | String | 委託類別 |
└─ dividendAmount | String | 除息金額 |
└─ securitiesLendingDifferentialFee | String | 券差借券費 |
└─ SellDetail | Object | 賣出詳情 |
└─ filledQuantity | String | 成交數量 |
└─ filledAmount | String | 成交金額 |
└─ netAmount | String | 淨收付 |
└─ marginAmount | String | 融資金額 |
└─ guaranteeAmount | String | 保證金金額 |
└─ shortCollateral | String | 融券擔保品 |
└─ securitiesLendingFee | String | 標借費 |
└─ adjustmentDate | String | 調整日期 |
└─ orderType | String | 委託別 : 0 整股、1、3 融資、2、4 融券、 9 現賣(擔保品) |
└─ orderTypeName | String | 委託類型名稱 |
└─ buySell | String | 買賣方向 |
└─ changeType | String | 變更類型 |
└─ isAdjusted | String | 是否開放調整成本 |
└─ ioFlag | String | 異動代碼 |
└─ ioName | String | 異動名稱 |
└─ no | String | 編號 |
└─ tDate | String | 交易日期 |
└─ orderNo | String | 委託序號 |
└─ filledNo | String | 成交序號 |
└─ closedQuantity | String | 沖銷股數 |
└─ filledPrice | String | 成交價格 |
└─ closedMarginAmount | String | 償還融資金額 |
└─ closedShortCollateral | String | 償還擔保品 |
└─ closedGuaranteeAmount | String | 償還融券保證金 |
└─ fee | String | 手續費 |
└─ interest | String | 利息 |
└─ tax | String | 稅金 |
└─ shortSellingFee | String | 借券費 |
└─ cost | String | 成本 |
└─ costBeforeDividend | String | 成本 (不扣除息金額) |
└─ income | String | 賣出收入 |
└─ profitLoss | String | 損益 |
└─ profitLossRate | String | 損益率 |
└─ otherCost | String | 其他費用 ( 除手續費、交易稅外的費用項目 (資/券利息也包含在內) ) |
└─ closeType | String | 沖銷類別 : 0 現股、1 融資、2 融券、3 信用當沖、4 現股當沖、5 現賣(未買回)/券差(買進) |
└─ securitiesTransactionTax | String | 證所稅 |
└─ healthInsurancePremium | String | 健保補充費 |
└─ orderTypeName2 | String | 委託類別 |
└─ dividendAmount | String | 除息金額 |
└─ securitiesLendingDifferentialFee | String | 券差借券費 |
請求範例
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)
}
}
]
}