Skip to main content

Hybrid Position

hybrid_position

Request Parameter

ParameterTypeMeaning
accountAccountAccount

Result Response

ParameterTypeMeaning
is_successboolInterface result
dataListInventory list is returned
messagestringis_success : False error description is returned

Position Parameter

參數類別說明
> datestringTransaction Date
> branch_nostringBranch Number
> accountstringAccount
> is_spreadboolSpread Order Flag
> position_kindintPosition Kind : 1 Future 、2 Option
> symbolstringSymbol
> expiry_dateintExpiry Date
> strike_pricefloatStrike Price
> call_putCallPutCall / Put : Call Call 、Put Put
> buy_sellBSActionBuy/Sell Type : BuySell
> pricefloatCost Price
> orig_lotsintOriginal Lot
> tradable_lotsintAvailable Lot
> order_typeFutOptOrderTypeOrder Type : New Open、Close Close、FdayTrade DayTrade
> currencystringCurrency
> market_pricestringMarket Price
> initial_marginfloatInitial Margin
> maintenance_marginfloatMaintenance Margin
> clearing_marginfloatClearing Margin
> opt_valuefloatOption market value
> opt_long_valuefloatLong Option market value
> opt_short_valuefloatShort Option market value
> profit_or_lossfloatProfit or Loss
> premiumfloatPremium
> spreadobjectSpread Detail
>> datestringTransaction Date
>> branch_nostringBranch Number
>> accountstringAccount
>> is_spreadboolSpread Order Flag
>> position_kindintPosition Kind : 1 Future 、2 Option
>> symbolstringSymbol
>> expiry_dateintExpiry Date
>> strike_pricefloatStrike Price
>> call_putCallPutCall / Put : Call Call 、Put Put
>> buy_sellBSActionBuy/Sell Type : BuySell
>> pricefloatCost Price
>> orig_lotsintOriginal Lot
>> tradable_lotsintAvailable Lot
>> order_type[FutOptOrderType] (/docs/trading-future/library/python/EnumMatrix/#futoptordertype)Order Type : New Open、Close Close、FdayTrade DayTrade
>> currencystringCurrency
>> market_pricestringMarket Price
>> initial_marginfloatInitial Margin
>> maintenance_marginfloatMaintenance Margin
>> clearing_marginfloatClearing Margin
>> opt_valuefloatOption market value
>> opt_long_valuefloatLong Option market value
>> opt_short_valuefloatShort Option market value
>> profit_or_lossfloatProfit or Loss
>> premiumfloatPreMium

Request Example

sdk.futopt_accounting.hybrid_position(account)

Response Example

Result {
is_success: True,
message: None,
data :[
Position {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
is_spread : False, # Spread Order Flag (bool)
position_kind : 1, # Position Kind : `1` Future 、`2` Option (int)
symbol : "FITX", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : None, # Strike Price (int or None)
call_put : None, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Buy, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : 20325.3333, # Cost Price (float)
orig_lots : 3, # Original Lot (int)
tradable_lots : 3, # Available Lot (int)
order_type : New, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "20351", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 0.0, # Option market value (float)
opt_long_value : 0.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : 0.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
spreads : None, # Spread Detail (List[SpreadPosition])
},
Position {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
is_spread : False, # Spread Order Flag (bool)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int))
symbol : "TX1", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : 206000, # Strike Price (float)
call_put : Call, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Buy, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : 10, # Cost Price (int)
orig_lots : 4, # Original Lot (int)
tradable_lots : 4, # Available Lot (int)
order_type : New, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "4.6", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 920.0, # Option market value (float)
opt_long_value : 920.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : -1080.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
spreads : None, # Spread Detail (List[SpreadPosition])
},
Position {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
is_spread : False, # Spread Order Flag (bool)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int)
symbol : "TXO", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : 198000, # Strike Price (float)
call_put : Call, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Sell, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : 243, # Cost Price (int)
orig_lots : 2, # Original Lot (int)
tradable_lots : 2, # Available Lot (int)
order_type : New, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "46", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 4600.0, # Option market value (float)
opt_long_value : 4600.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : -19700.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
spreads : None, # Spread Detail (List[SpreadPosition])
}
Position {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
is_spread : False, # Spread Order Flag (bool)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int)
symbol : "TXO", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : 200000, # Strike Price (float)
call_put : Put, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Buy, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : 344, # Cost Price (int)
orig_lots : 2, # Original Lot (int)
tradable_lots : 2, # Available Lot (int)
order_type : New, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "82", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 8200.0, # Option market value (float)
opt_long_value : 8200.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : -26200.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
spreads : None, # Spread Detail (List[SpreadPosition])
},
Position {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
is_spread : True, # Spread Order Flag (bool)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int)
symbol : "TXO20100D4:20000P4", # Symbol (str)
expiry_date : "1", # Expiry Date (string)
strike_price : 1, # Strike Price (float)
call_put : None, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Buy, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : None, # Cost Price (int)
orig_lots : 2, # Original Lot (int)
tradable_lots : 2, # Available Lot (int)
order_type : New, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "0.0", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 0.0, # Option market value (float)
opt_long_value : 0.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : 0.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
spreads : [ # Spread Detail (List[SpreadPosition])
SpreadPosition {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int)
symbol : "TXO", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : 201000, # Strike Price (float)
call_put : Call, # Call / Put : `Call` 、`Put` (CallPut)
buy_sell : Buy, # Buy/Sell Type : `Buy` 、`Sell` (BSAction)
price : 185, # Cost Price (int)
orig_lots : 2, # Original Lot (int)
tradable_lots : 2, # Available Lot (int)
order_type : None, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "365", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0,# Initial Margin (float)
opt_value : 36500.0, # Option market value (float)
opt_long_value : 36500.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : 18000.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
},
SpreadPosition {
date : "2024/04/08", # Transaction Date (str)
branch_no : "15901", # Branch Number (str)
account : "1234567", # Account (str)
position_kind : 2, # Position Kind : `1` Future 、`2` Option (int)
symbol : "TXO", # Symbol (str)
expiry_date : "202404", # Expiry Date (string)
strike_price : 201000, # Strike Price (float)
call_put : Put, # Call / Put : `Call` 、`Put` (int)
buy_sell : Buy, # Buy/Sell Type : `Buy`、`Sell` (BSAction)
price : 0, # Cost Price (int)
orig_lots : 2, # Original Lot (int)
tradable_lots : 2, # Available Lot (int)
order_type : None, # Order Type : `New` Open、`Close` Close、`FdayTrade` DayTrade (FutOptOrderType)
currency : "TWD", # Currency (str)
market_price : "0.0", # Market Price (str)
initial_margin : 0.0, # Initial Margin (float)
maintenance_margin : 0.0, # Maintenance Margin (float)
clearing_margin : 0.0, # Clearing Margin (float)
initial_margin_all_single : 0.0, # Initial Margin (float)
opt_value : 0.0, # Option market value (float)
opt_long_value : 0.0, # Long Option market value (float)
opt_short_value : 0.0, # Short Option market value (float)
profit_or_loss : 0.0, # Profit or Loss (float)
premium : 0.0, # Premium (float)
},
],
}
]
}