Batch Modify Lot
batchModifyLot
First, using 'makeModifyLotObj' create a 'FutOptModifyLot' object
| Parameter | Type | Meaning |
|---|---|---|
| orderResult | FutOptOrderResult | The intended order result object to be modified |
| lot | number | The lot after modification ( The modified lot includes the partially filled portion of this order ) |
Put the returned object into the 'batchModifyLot' function
Request Parameter
| Parameter | Type | Meaning |
|---|---|---|
| account | Account | Account |
| ModifyLotObj | FutOptModifyLot (list of object) | The object for Lot modification |
Result Response
| Parameter | Type | Meaning |
|---|---|---|
| isSuccess | bool | Interface result |
| data | Object | Modified content is returned |
| message | string ? (optional) | isSuccess = False error description is returned |
FutOptOrderResult Parameter
Return type : Object
| Parameter | Type | Meaning |
|---|---|---|
| functionType | number | Function Type : 0 New 、 10 Execute New、15 Amend Price 、 20 Amend Lot 、 30 Cancel、90Failed |
| date | string | Transaction date |
| seqNo | string | Order serial number |
| branchNo | string | Branch number |
| account | string | Account |
| orderNo | string | Order number |
| assetType | number | Asset type : 1 Future 、2 Option |
| market | string | Market type : TAIMEX Future、Option |
| marketType | js:string / ts:FutOptMarketType | Trading session type : Future 、 Option 、 FutureNight After-Hour Future 、 OptionNight After-Hour Option |
| unit | number | Trading Unit |
| currency | string | Trading Currency |
| symbol | string | Symbol |
| expiryDate | string | Expiry Date |
| strikePrice | number | Strike Price |
| callPut | js:string / ts:CallPut | Call / Put Type : Call Call 、Put Put |
| buySell | js:string / ts:BSAction | Buy/Sell Type : Buy 、 Sell |
| symbolLeg2 | string | Symbol - Spread Order |
| expiryDateLeg2 | string | Expiry Date - Spread Order |
| strikePriceLeg2 | number | Strike Price - Spread Order |
| callPutLeg2 | js:string / ts:CallPut | Call / Put Type : Call Call 、Put Put |
| buySellLeg2 | js:string / ts:BSAction | Buy/Sell Type : Buy 、 Sell |
| priceType | js:string / ts:FutOptPriceType | Original order price type : Limit 、 Market 、 RangeMarket Market with Protection Orders 、 Reference |
| price | number | Order Price |
| lot | number | Original order lot |
| timeInForce | js:string / ts:TimeInForce | Time In Force ROD 、 FOK 、 IOC |
| orderType | js:string / ts:FutOptOrderType | Order Type : New 、 Close 、 Auto 、 FdayTrade |
| isPreOrder | bool | Reservation Flag |
| status | number | Order 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 |
| afterPriceType | js:string / ts:FutOptPriceType | Valid order price type : Limit 、 Market 、 RangeMarket Market with Protection Orders 、 Reference |
| afterPrice | number | Valid order price |
| afterLot | number | Valid Order Lot |
| filledLot | number | Filled Lot |
| filledMoney | number | Filled Value |
| beforeLot | number | Before the Lot Modification |
| beforePrice | number | Before the Price Modification |
| userDef | string | Custom Fields |
| lastTime | string | Last Modification Time |
| details | list | Order Process (Return value when query orderResultDetail or orderHistory ) |
| errorMessage | string | Error Message |
Request Example
// Batch lot modification ( modifying orders using the content returned by batch detail )
modify_orders = [
sdk.futopt.makeModifyLotObj(batch_res.data[0], 2),
sdk.futopt.makeModifyLotObj(batch_res.data[1], 2)
]
sdk.futopt.batchModifyLot(account, modify_orders);
// Batch lot modification ( Using different individual orders )
modify_orders = [
sdk.futopt.makeModifyLotObj(orderResult.data[22], 2),
sdk.futopt.makeModifyLotObj(orderResult.data[40], 2)
]
sdk.futopt.batchModifyLot(account, modify_orders);
Response Example
{
isSuccess: true,
data:[ // Batch lot modification ( modifying orders using the content returned by batch detail )
{
functionType: 20, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "03100161419", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "l002D", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: FutureNight, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FIMTX", // 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: 3, // 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: 20000, // Valid Order Price (number)
afterLot: 2, // 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: "18:24:50", // Last Modification Time (string)
},
{
functionType: 20, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "03100161420", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "l002E", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: FutureNight, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FIMTX", // Symbol (string)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
...
}
]
}
Below example only extract data content
[ // Batch lot modification ( Using different individual orders )
{
functionType: 20, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "03100161519", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "l005D", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: FutureNight, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FIMTX", // Symbol (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: 3, // 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: 20000, // Valid Order Price (number)
afterLot: 2, // 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: "18:24:50", // Last Modification Time (string)
},
{
functionType: 20, // Function Type (number)
date: "2024/03/25", // Transaction Date (string)
seqNo: "03100161520", // Order Serial Number (string)
branchNo: "15901", // Branch Number (string)
account: "1234567", // Account (string)
orderNo: "l005E", // Order Number (string)
assetType: 1, // Asset Type (number): `1` Future, `2` Option
market: "TAIMEX", // Market Type (string)
marketType: FutureNight, // Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight`, `OptionNight`
currency: "TWD", // Trading Currency (string)
symbol: "FIMTX", // Symbol (string)
buySell: Buy, // Buy/Sell Type (BSAction): `Buy`, `Sell`
...
}
]