Skip to main content

混合部位查詢

query_hybrid_position

輸入參數

參數類別說明
accountAccount帳號

Result 回傳

參數類別說明
is_successbool是否成功
dataList回傳混和部位資訊
messagestring當is_success : false 回傳錯誤訊息

部位 HybridPosition 欄位

Return type : Object

參數類別說明
> datestring部位建立日期
> branch_nostring分公司代號
> accountstring帳號
> is_spreadbool是否為複式部位
> position_kindint部位種類 : 1 期貨 、2 選擇權
> symbolstring商品代號
> expiry_datestring履約日
> strike_pricefloat履約價
> call_putCallPut權利別 : CallPut
> buy_sellBSAction買賣別 : Buy 買、Sell
> pricefloat成交價
> orig_lotsint原始口數
> tradable_lotsint可交易口數
> order_typeFutOptOrderType委託別 : New 新倉、Close平倉、FdayTrade當沖
> currencystring幣別
> market_pricestring即時價
> initial_marginfloat原始保證金
> maintenance_marginfloat維持保證金
> clearing_marginfloat結算保證金
> opt_valuefloat選擇權市值
> opt_long_valuefloat選擇權買進市值
> opt_short_valuefloat選擇權賣出市值
> profit_or_lossfloat部位損益
> premiumfloat權利金
>> spreadobject複式部位解析
>> datestring部位建立日期
>> branch_nostring分公司代號
>> accountstring帳號
>> is_spreadbool是否為複式部位
>> position_kindint部位種類 : 1 期貨 、2 選擇權
>> symbolstring商品代號
>> expiry_datestring履約日
>> strike_pricefloat履約價
>> call_putCallPut權利別 : CallPut
>> buy_sellBSAction買賣別 : Buy 買、Sell
>> pricefloat成交價
>> orig_lotsint原始口數
>> tradable_lotsint可交易口數
>> order_typeFutOptOrderType委託別 : New 新倉、Close平倉、FdayTrade當沖
>> currencystring幣別
>> market_pricestring即時價
>> initial_marginfloat原始保證金
>> maintenance_marginfloat維持保證金
>> clearing_marginfloat結算保證金
>> opt_valuefloat選擇權市值
>> opt_long_valuefloat選擇權買進市值
>> opt_short_valuefloat選擇權賣出市值
>> profit_or_lossfloat部位損益
>> premiumfloat權利金

請求範例

sdk.futopt_accounting.query_hybrid_position(account)

回傳範例

Result {
is_success: True,
message: None,
data : [HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 1, # 部位種類 (int)
symbol : "FITX", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : None, # 履約價 (int or None)
call_put : None, # 權利別 (int or None)
buy_sell : Buy, # 買賣別 (BSAction)
price : 20325.3333, # 成交價 (float)
orig_lots : 3, # 原始口數 (int)
tradable_lot : 3, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "20351", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 0.0, # 選擇權市值 (float)
opt_long_value : 0.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : 0.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int))
symbol : "TX1", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 206000, # 履約價 (float)
call_put : Call, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 10, # 成交價 (int)
orig_lots : 4, # 原始口數 (int)
tradable_lot : 4, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "4.6", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 920.0, # 選擇權市值 (float)
opt_long_value : 920.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : -1080.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 198000, # 履約價 (float)
call_put : Call, # 權利別 (CallPut)
buy_sell : Sell, # 買賣別 (BSAction)
price : 243, # 成交價 (int)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : New, # 委託別 (int)
currency : "TWD", # 幣別 (str)
market_price : "46", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 4600.0, # 選擇權市值 (float)
opt_long_value : 4600.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : -19700.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 200000, # 履約價 (float)
call_put : Call, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 500, # 成交價 (int)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "430", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 43000.0, # 選擇權市值 (float)
opt_long_value : 43000.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : -7000.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 200000, # 履約價 (float)
call_put : Put, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 344, # 成交價 (int)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "82", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 8200.0, # 選擇權市值 (float)
opt_long_value : 8200.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : -26200.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : False, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202405, # 履約日 (string)
strike_price : 199000, # 履約價 (float)
call_put : Call, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 610, # 成交價 (int)
orig_lots : 1, # 原始口數 (int)
tradable_lot : 1, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "670", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 33500.0, # 選擇權市值 (float)
opt_long_value : 33500.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : 3000.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : None, # 複式部位 (List[SpreadPosition])
},
HybridPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
is_spread : True, # 是否為複式部位 (bool)
position_kind : 2, # 部位種類 (int)
symbol : "TXO20100D4:20000P4", # 商品代號 (str)
expiry_date : 1, # 履約日 (string)
strike_price : 1, # 履約價 (float)
call_put : None, # 權利別 (int or None)
buy_sell : Buy, # 買賣別 (BSAction)
price : None, # 成交價 (int or None)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : New, # 委託別 (FutOptOrderType)
currency : "TWD", # 幣別 (str)
market_price : "0.0", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 0.0, # 選擇權市值 (float)
opt_long_value : 0.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : 0.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
spreads : [ # 複式部位 (List[SpreadPosition])
SpreadPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 201000, # 履約價 (float)
call_put : Call, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 185, # 成交價 (int)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : None, # 委託別 (int or None)
currency : "TWD", # 幣別 (str)
market_price : "365", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 36500.0, # 選擇權市值 (float)
opt_long_value : 36500.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : 18000.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
},
SpreadPosition {
date : "2024/04/08", # 部位建立日期 (str)
branch_no : "15901", # 分公司代號 (str)
account : "1234567", # 帳號 (str)
position_kind : 2, # 部位種類 (int)
symbol : "TXO", # 商品代號 (str)
expiry_date : 202404, # 履約日 (string)
strike_price : 200000, # 履約價 (float)
call_put : Put, # 權利別 (CallPut)
buy_sell : Buy, # 買賣別 (BSAction)
price : 354, # 成交價 (int)
orig_lots : 2, # 原始口數 (int)
tradable_lot : 2, # 可交易口數 (int)
order_type : None, # 委託別 (int or None)
currency : "TWD", # 幣別 (str)
market_price : "82", # 即時價 (str)
initial_margin : 0.0, # 原始保證金 (float)
maintenance_margin : 0.0, # 維持保證金 (float)
clearing_margin : 0.0, # 結算保證金 (float)
initial_margin_all_single : 0.0, # 原始保證金 (float)
opt_value : 8200.0, # 選擇權市值 (float)
opt_long_value : 8200.0, # 選擇權買進市值 (float)
opt_short_value : 0.0, # 選擇權賣出市值 (float)
profit_or_loss : -27200.0, # 部位損益 (float)
premium : 0.0, # 權利金 (float)
},
],
}
]
}