Skip to main content

Batch Modify Price

batchModifyPrice

First, using 'makeModifyPriceObj' create a 'FutOptModifyPrice' object

ParameterTypeMeaning
orderResultFutOptOrderResultThe intended order result object to be modified
pricestring?The price after modification
priceTypeFutOptPriceType?The price type after modification
caution

When 'price' is filled, priceType should be empty or null ; otherwise, the 'price' field should be empty or null

Put the returned object into the 'batchModifyPrice' function

Request Parameter

ParameterTypeMeaning
accountAccountAccount
ModifyPriceObjFutOptModifyPrice (list of object)The object for price modification

Result Response

ParameterTypeMeaning
isSuccessboolInterface result
dataObjectModified content is returned
messagestring ? (optional)isSuccess = False error description is returned

FutOptOrderResult Parameter

Return type : Object

ParameterTypeMeaning
functionTypenumberFunction Type : 0 New 、 10 Execute New、15 Amend Price 、 20 Amend Lot 、 30 Cancel、90Failed
datestringTransaction date
seqNostringOrder serial number
branchNostringBranch number
accountstringAccount
orderNostringOrder number
assetTypenumberAsset type : 1 Future 、2 Option
marketstringMarket type : TAIMEX Future、Option
marketTypejs:string / ts:FutOptMarketTypeTrading session type : FutureOptionFutureNight After-Hour Future 、 OptionNight After-Hour Option
unitnumberTrading Unit
currencystringTrading Currency
symbolstringSymbol
expiryDatestringExpiry Date
strikePricenumberStrike Price
callPutjs:string / ts:CallPutCall / Put Type : Call Call 、Put Put
buySelljs:string / ts:BSActionBuy/Sell Type : BuySell
symbolLeg2stringSymbol - Spread Order
expiryDateLeg2stringExpiry Date - Spread Order
strikePriceLeg2numberStrike Price - Spread Order
callPutLeg2js:string / ts:CallPutCall / Put Type : Call Call 、Put Put
buySellLeg2js:string / ts:BSActionBuy/Sell Type : BuySell
priceTypejs:string / ts:FutOptPriceTypeOriginal order price type : LimitMarketRangeMarket Market with Protection Orders 、 Reference
pricenumberOrder Price
lotnumberOriginal order lot
timeInForcejs:string / ts:TimeInForceTime In Force RODFOKIOC
orderTypejs:string / ts:FutOptOrderTypeOrder Type : NewCloseAutoFdayTrade
isPreOrderboolReservation Flag
statusnumberOrder Status : 0 Reservation 、 4 In queue 、 8 Processing by system backend 、 9 TimeOut 、 10 Active Order 、 30 Cancel Order 、 50 Fully Filled 、 90 Order Failed
afterPriceTypejs:string / ts:FutOptPriceTypeValid order price type : LimitMarketRangeMarket Market with Protection Orders 、 Reference
afterPricenumberValid order price
afterLotnumberValid Order Lot
filledLotnumberFilled Lot
filledMoneynumberFilled Value
beforeLotnumberBefore the Lot Modification
beforePricenumberBefore the Price Modification
userDefstringCustom Fields
lastTimestringLast Modification Time
detailslistOrder Process (Return value when query orderResultDetail or orderHistory )
errorMessagestringError Message

Request Example

// Batch price modification ( modifying orders using the content returned by batch detail )
modify_orders = [
sdk.futopt.makeModifyPriceObj(batch_res.data[0], "19900"),
sdk.futopt.makeModifyPriceObj(batch_res.data[1], "19900")
]

sdk.futopt.batchModifyPrice(account, modify_orders);


// Batch price modification ( Using different individual orders )
modify_orders = [
sdk.futopt.makeModifyPriceObj(orderResult.data[20], "19900"),
sdk.futopt.makeModifyPriceObj(orderResult.data[21], "19900"),
sdk.futopt.makeModifyPriceObj(orderResult.data[28], "19900")
]

sdk.futopt.batchModifyPrice(account, modify_orders);

Response Example

{
isSuccess: true,
data:[ // Batch price modification (modifying orders using the content returned by batch detail)
{
functionType: 15, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "00110212863", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "C0020", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FITX", // Symbol (string)
expiryDate: "202404", // Expiry Date (string)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
priceType: Limit, // Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket`, `Reference`
price: 20000, // Order Price (number)
lot: 1, // Original Order Lot (number)
timeInForce: ROD, // Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
orderType: New, // Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade`
isPreOrder: false, // Reservation Order Flag (bool)
status: 10, // Order Status (number): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
afterPriceType: Limit, // Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket`, `Reference`
afterPrice: 19900, // Valid Order Price (number)
afterLot: 1, // Valid Order Lot (number)
filledLot: 0, // Filled Lot (number)
filledMoney: 0, // Filled Value (number)
beforePrice: 20000, // Before the Price Modification (number)
lastTime: "13:40:05", // Last Modification Time (string)
},
{
functionType: 15, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "00110212864", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "C0021", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FITX", // Symbol (string)
expiryDate: "202404", // Expiry Date (string)
strikePrice: 0, // Strike Price (number)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
...
}
]
}

Below example only extract data content

[ // Batch price modification( Using different individual orders )
{
functionType: 15, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "00110212887", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "C0034", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FITX", // Symbol (string)
expiryDate: "202404", // Expiry Date (string)
strikePrice: 0, // Strike Price (number)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
priceType: Limit, // Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket`, `Reference`
price: 20000, // Order Price (number)
lot: 1, // Original Order Lot (number)
timeInForce: ROD, // Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
orderType: New, // Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade`
isPreOrder: false, // Reservation Order Flag (bool)
status: 10, // Order Status (number): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
afterPriceType: Limit, // Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket`, `Reference`
afterPrice: 19900, // Valid Order Price (number)
afterLot: 1, // Valid Order Lot (number)
filledLot: 0, // Filled Lot (number)
filledMoney: 0, // Filled Value (number)
beforeLot: 0, // Before the Lot Modification (number)
beforePrice: 20000, // Before the Price Modification (number)
lastTime: "13:40:05", // Last Modification Time (string)
},
{
functionType: 15, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "00110212888", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "C0035", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: Future, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FITX", // Symbol (string)
expiryDate: "202404", // Expiry Date (string)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
...
}
...
]