Skip to main content

Query Single Position

querySinglePosition

Request Parameter

ParameterTypeMeaning
accountAccountAccount

Result Response

ParameterTypeMeaning
isSuccessboolInterface result
dataObjectPosition list is returned
messagestring ? (optional)isSuccess = False error description is returned

Position Parameter

Return type : Object

ParameterTypeMeaning
datestringTransaction Date
branchNostringBranch Number
accountstringAccount
isSpreadboolSpread Order Flag
positionKindnumberPosition Kind : 1 Future 、2 Option
symbolstringSymbol
symbolNamestringSymbol Name
expiryDatenumberExpiry Date
strikePricenumberStrike Price
callPutCallputCall / Put : Call Call 、Put Put
buySellBSActionBuy/Sell Type : BuySell
pricenumberCost Price
origLotsnumberOriginal Lot
tradableLotsnumberAvailable Lot
orderTypeFutOptOrderTypeOrder Type : New Open、Close Close、FdayTrade DayTrade
currencystringCurrency
marketPricestringMarket Price
initialMarginnumberInitial Margin
maintenanceMarginnumberMaintenance Margin
clearingMarginnumberClearing Margin
optValuenumberOption market value
optLongValuenumberLong Option market value
optShortValuenumberShort Option market value
profitOrLossnumberProfit or Loss
premiumnumberPremium

Request Example

sdk.futoptAccounting.querySinglePosition(account);

Response Example

{
isSuccess: true,
data:[
{
dataDate: '2024/04/08', // Date (string)
branchNo: '15901', // Branch Number (string)
account: '1234567', // Account (string)
orderNo: 'l0001-0000', // Order Number (string)
positionKind: 1, // Position Kind (number)
symbol: 'FITX', // Symbol (string)
expiryDate: 202404, // Expiry Date (number)
strikePrice: null, // Strike Price (number)
callPut: null, // Call/Put Type (CallPut)
buySell: Buy, // Buy/Sell Type (BSAction)
price: 20362, // Cost Price (number)
origLots: 2, // Original Lot (number)
tradableLot: 2, // Tradable Lot (number)
orderType: 0, // Order Type (FutOptOrderType)
currency: 'TWD', // Currency (string)
marketPrice: '20521.0000', // Market Price (string)
initialMargin: 358000.0, // Initial Margin (number)
maintenanceMargin: 274000.0, // Maintenance Margin (number)
clearingMargin: 264000.0, // Clearing Margin (number)
profitOrLoss: 63600.0, // Profit or Loss (number)
premium: 0.0, // Premium (number)
},
{
dataDate: '2024/03/29', // Date (string)
branchNo: '15901', // Branch Number (string)
account: '1234567', // Account (string)
orderNo: 'l0007-0000', // Order Number (string)
positionKind: 2, // Position Kind (number)
symbol: 'TX1', // Symbol (string)
expiryDate: 202404, // Expiry Date (number)
strikePrice: 20600, // Strike Price (number)
callPut: Call, // Call/Put Type (CallPut)
buySell: Buy, // Buy/Sell Type (BSAction)
price: 10, // Cost Price (number)
origLots: 2, // Original Lot (number)
tradableLot: 2, // Tradable Lot (number)
orderType: New, // Order Type (FutOptOrderType)
currency: 'TWD', // Currency (string)
marketPrice: '4.6000', // Market Price (string)
initialMargin: 52660.0, // Initial Margin (number)
maintenanceMargin: 36460.0, // Maintenance Margin (number)
clearingMargin: 34460.0, // Clearing Margin (number)
profitOrLoss: -540.0, // Profit or Loss (number)
premium: -1000.0, // Premium (number)
},
{
dataDate: '2024/03/29', // Date (string)
branchNo: '15901', // Branch Number (string)
account: '1234567', // Account (string)
orderNo: 'l0007-0001', // Order Number (string)
positionKind: 2, // Position Kind (number)
symbol: 'TX1', // Symbol (string)
expiryDate: 202404, // Expiry Date (number)
strikePrice: 20600, // Strike Price (number)
callPut: Call, // Call/Put Type (CallPut)
buySell: Buy, // Buy/Sell Type (BSAction)
price: 10, // Cost Price (number)
origLots: 2, // Original Lot (number)
tradableLot: 2, // Tradable Lot (number)
orderType: New, // Order Type (FutOptOrderType)
currency: 'TWD', // Currency (string)
marketPrice: '4.6000', // Market Price (string)
initialMargin: 52660.0, // Initial Margin (number)
maintenanceMargin: 36460.0, // Maintenance Margin (number)
clearingMargin: 34460.0, // Clearing Margin (number)
profitOrLoss: -540.0, // Profit or Loss (number)
premium: -1000.0, // Premium (number)
},
{
dataDate: '2024/03/01', // Date (string)
branchNo: '15901', // Branch Number (string)
account: '1234567', // Account (string)
orderNo: 'l0002-0000', // Order Number (string)
positionKind: 2, // Position Kind (number)
symbol: 'TXO', // Symbol (string)
expiryDate: 202404, // Expiry Date (number)
strikePrice: 18500, // Strike Price (number)
callPut: Call, // Call/Put Type (CallPut)
buySell: Sell, // Buy/Sell Type (BSAction)
price: 625, // Cost Price (number)
origLots: 5, // Original Lot (number)
tradableLot: 4, // Tradable Lot (number)
orderType: New, // Order Type (FutOptOrderType)
currency: 'TWD', // Currency (string)
marketPrice: '2020.0000', // Market Price (string)
initialMargin: 584000.0, // Initial Margin (number)
maintenanceMargin: 544000.0, // Maintenance Margin (number)
clearingMargin: 536000.0, // Clearing Margin (number)
profitOrLoss: -279000.0, // Profit or Loss (number)
premium: 125000.0, // Premium (number)
}
]
}