Skip to main content

Query Single Position

query_single_position

Request Parameter

ParameterTypeMeaning
accountAccountAccount

Result Response

ParameterTypeMeaning
is_successboolInterface result
dataListPosition list is returned
messagestringis_success = False error description is returned

Position Example

Return type : Object

ParameterTypeMeaning
datestringTransaction Date
branch_nostringBranch Number
accountstringAccount
is_spreadboolSpread Flag
position_kindintPosition Kind : 1 Future 、2 Option
symbolstringSymbol
expiry_dateintExpiry Date
strike_pricefloatStrike Price
call_putCallPutCall / Put Type : 1 Call 、2 Put
buy_sellBSActionBuy / Sell Type : BuySell
pricefloatCost Price
orig_lotsintOriginal Lot
tradable_lotsintAvailable Lot
order_typeFutOptOrderTypeOrder Type : New Open Position、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.query_single_position(accounts)

Response Example

Result {
is_success: True,
message: None,
data :
[
Position {
date: "2024/04/08", # Transaction Date (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l0001-0000", # Order Number (string)
position_kind: 1, # Position Kind (int)
symbol: "FITX", # Symbol (string)
expiry_date: 202404, # Expiry Date (int)
strike_price: None, # Strike Price (float)
call_put: None, # Call/Put Type (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction)
price: 20362, # Cost Price (float)
orig_lots: 2, # Original Lot (int)
tradable_lot: 2, # Tradable Lot (int)
order_type: New, # Order Type (FutOptOrderType)
currency: "TWD", # Currency (string)
market_price: "20521.0000", # Market Price (string)
initial_margin: 358000.0, # Initial Margin (float)
maintenance_margin: 274000.0, # Maintenance Margin (float)
clearing_margin: 264000.0, # Clearing Margin (float)
profit_or_loss: 63600.0, # Profit or Loss (float)
premium: 0.0, # Premium (float)
},
Position {
date: "2024/03/29", # Transaction Date (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l0007-0000", # Order Number (string)
position_kind: 2, # Position Kind (int)
symbol: "TX1", # Symbol (string)
expiry_date: 202404, # Expiry Date (int)
strike_price: 20600, # Strike Price (float)
call_put: Call, # Call/Put Type (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction)
price: 10, # Cost Price (float)
orig_lots: 2, # Original Lot (int)
tradable_lot: 2, # Tradable Lot (int)
order_type: New, # Order Type (FutOptOrderType)
currency: "TWD", # Currency (string)
market_price: "4.6000", # Market Price (string)
initial_margin: 52660.0, # Initial Margin (float)
maintenance_margin: 36460.0, # Maintenance Margin (float)
clearing_margin: 34460.0, # Clearing Margin (float)
profit_or_loss: -540.0, # Profit or Loss (float)
premium: -1000.0, # Premium (float)
},
Position {
date: "2024/03/29", # Transaction Date (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l0007-0001", # Order Number (string)
position_kind: 2, # Position Kind (int)
symbol: "TX1", # Symbol (string)
expiry_date: 202404, # Expiry Date (int)
strike_price: 20600, # Strike Price (float)
call_put: Call, # Call/Put Type (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction)
price: 10, # Cost Price (float)
orig_lots: 2, # Original Lot (int)
tradable_lot: 2, # Tradable Lot (int)
order_type: New, # Order Type (FutOptOrderType)
currency: "TWD", # Currency (string)
market_price: "4.6000", # Market Price (string)
initial_margin: 52660.0, # Initial Margin (float)
maintenance_margin: 36460.0, # Maintenance Margin (float)
clearing_margin: 34460.0, # Clearing Margin (float)
profit_or_loss: -540.0, # Profit or Loss (float)
premium: -1000.0, # Premium (float)
},
Position {
date: "2024/03/01", # Transaction Date (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l0002-0000", # Order Number (string)
position_kind: 2, # Position Kind (int)
symbol: "TXO", # Symbol (string)
expiry_date: 202404, # Expiry Date (int)
strike_price: 18500, # Strike Price (float)
call_put: Call, # Call/Put Type (CallPut)
buy_sell: Sell, # Buy/Sell Type (BSAction)
price: 625, # Cost Price (float)
orig_lots: 5, # Original Lot (int)
tradable_lot: 4, # Tradable Lot (int)
order_type: New, # Order Type (FutOptOrderType)
currency: "TWD", # Currency (string)
market_price: "2020.0000", # Market Price (string)
initial_margin: 584000.0, # Initial Margin (float)
maintenance_margin: 544000.0, # Maintenance Margin (float)
clearing_margin: 536000.0, # Clearing Margin (float)
profit_or_loss: -279000.0, # Profit or Loss (float)
premium: 125000.0, # Premium (float)
}
]
}