Skip to main content

Batch Modify Lot

batch_modify_lot

First, using 'make_modify_lot_obj' create a 'FutOptModifyLot' object

ParameterTypeMeaning
orderResultFutOptOrderResultThe intended order result object to be modified
lotintThe lot after modification ( The modified lot includes the partially filled portion of this order )

Put the returned object into the 'modify_lot' function

Request Parameter

ParameterTypeMeaning
accountAccountAccount
ModifyLotObjFutOptModifyLot (list of object )The object for Lot modification

Result Response

ParameterTypeMeaning
is_successboolInterface result
dataListModified content is returned
messagestringis_success = False error description is returned

FutOptOrderResult Parameter

Return type : Object

ParameterTypeMeaning
function_typeintFunction Type : 0 New, 10 Execute New, 15 Amend Price, 20 Amend Lot, 30 Cancel, 90Failed
datestringTransaction Date
seq_nostringOrder Serial Number
branch_nostringBranch Number
accountstringAccount
order_nostringOrder Number
asset_typeintAsset Type : 1 Future, 2 Option
marketstringMarket Type : TAIMEX Future, Option
market_typeFutOptMarketTypeTrading Session Type : Future, Option, FutureNight After-Hour Future, OptionNight After-Hour Option
unitintUnit
currencystringTrading Currency
symbolstringSymbol
expiry_datestringExpiry Date
strike_pricefloatStrike Price
call_putCallPutCall / Put : Call, Put
buy_sellBSActionBuy/Sell Type : Buy, Sell
symbol_leg2stringSpread Symbol
expiry_date_leg2stringExpiry Date - Spread Order
strike_price_leg2floatStrike Price - Spread Order
call_put_leg2CallPutCall / Put : Call, Put
buy_sell_leg2BSActionBuy/Sell Type - Spread Order: Buy, Sell
price_typeFutOptPriceTypeOriginal Order Price Type : Limit, Market, RangeMarket Market with Protection Orders, Reference
pricefloatOrder Price
lotsintOriginal Order Lot
time_in_forceTimeInForceTime In Force : ROD FOK, IOC
order_typeFutOptOrderTypeOrder Type : New, Close, Auto, FdayTrade DayTrade
is_pre_orderboolReservation Order Flag
statusintOrder 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
after_price_typeFutOptPriceTypeValid Order Price Type : Limit Market, RangeMarket Market with Protection Orders, Reference
after_pricefloatValid Order Price
after_lotintValid Order Lot
filled_lotintFilled Lot
filled_moneyfloatFilled Value
before_lotintBefore the Lot Modification
before_pricefloatBefore the Price Modification
user_defstringCustom Fields
last_timestringLast Modification Time
detailslistOrder Process (Return value when query order_result_detail or order_history )
error_messagestringError Message

Request Example

# Batch quantity modification using content returned by batch detail
modify_objects = [
sdk.futopt.make_modify_lot_obj(batch_results_detail.data[0], 2),
sdk.futopt.make_modify_lot_obj(batch_results_detail.data[1], 2),
]
sdk.futopt.batch_modify_lot(target_user, modify_objects)

# Batch quantity modification using individual orders
modify_objects = [
sdk.futopt.make_modify_lot_obj(orders.data[37], 2),
sdk.futopt.make_modify_lot_obj(orders.data[35], 2),
]

sdk.futopt.batch_modify_lot(target_user, modify_objects)

Response

Result {
is_success: True,
message: None,
data : [ FutOptOrderResult{ # Batch quantity modification using content returned by batch detail
function_type: 20, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "03100161319", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l001D", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: FutureNight, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FIMTX", # Symbol (string)
expiry_date: "202404", # Expiry Date (string)
strike_price: None, # Strike price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Symbol - second leg of spread order (string)
expiry_date_leg2: None, # Expiry date - second leg of spread order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (string)
buy_sell_leg2: None, # Buy/sell side - second leg of spread order (BSAction)
price_type: Limit, # Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price: 20000, # Order Price (float)
lot: 3, # Original order lot (int)
time_in_force: ROD, # Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
order_type: New, # Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
is_pre_order: False, # Reservation Order Flag (bool)
status: 10, # Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
after_price_type: Limit, # Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
after_price: 20000, # Valid Order Price (float)
after_lot: 2, # Valid Order Lot (int)
filled_lot: 0, # Filled Lot (int)
filled_money: 0, # Filled Value (int)
before_lot: 3, # Valid order lot before modification (int)
before_price: None, # Before the Price Modification (float)
user_def: None, # Custom Fields (string)
last_time: "18:24:40", # Last Modification Time (string)
details: None, # Order history (list)
error_message: None, # Error Message (string)
},
FutOptOrderResult{ # Batch quantity modification using content returned by batch detail
function_type: 20, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "03100161320", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l001E", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: FutureNight, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FIMTX", # Symbol (string)
expiry_date: "202404", # Expiry Date (string)
strike_price: None, # Strike price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Symbol - second leg of spread order (string)
expiry_date_leg2: None, # Expiry date - second leg of spread order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (string)
buy_sell_leg2: None, # Buy/sell side - second leg of spread order (BSAction)
price_type: Limit, # Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price: 20000, # Order Price (float)
lot: 3, # Original order lot (int)
time_in_force: ROD, # Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
order_type: New, # Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
is_pre_order: False, # Reservation Order Flag (bool)
status: 10, # Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
...
}]
}


The following example shows an excerpt of the data content

[FutOptOrderResult{ # Batch quantity modification using individual orders
function_type: 20, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "03100161321", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l001F", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: FutureNight, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FIMTX", # Symbol (string)
expiry_date: "202404", # Expiry Date (string)
strike_price: None, # Strike price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Symbol - second leg of spread order (string)
expiry_date_leg2: None, # Expiry date - second leg of spread order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (string)
buy_sell_leg2: None, # Buy/sell side - second leg of spread order (BSAction)
price_type: Limit, # Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price: 20000, # Order Price (float)
lot: 3, # Original order lot (int)
time_in_force: ROD, # Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
order_type: New, # Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
is_pre_order: False, # Reservation Order Flag (bool)
status: 10, # Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
after_price_type: Limit, # Valid Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
after_price: 20000, # Valid Order Price (float)
after_lot: 2, # Valid Order Lot (int)
filled_lot: 0, # Filled Lot (int)
filled_money: 0, # Filled Value (int)
before_lot: 3, # Valid order lot before modification (int)
before_price: None, # Before the Price Modification (float)
user_def: None, # Custom Fields (string)
last_time: "18:24:40", # Last Modification Time (string)
error_message: None, # Error Message (string)
},
FutOptOrderResult{
function_type: 20, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "03100161322", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "l001G", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: FutureNight, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FIMTX", # Symbol (string)
expiry_date: "202404", # Expiry Date (string)
strike_price: None, # Strike price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Symbol - second leg of spread order (string)
expiry_date_leg2: None, # Expiry date - second leg of spread order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (string)
buy_sell_leg2: None, # Buy/sell side - second leg of spread order (BSAction)
price_type: Limit, # Original Order Price Type (FutOptPriceType): `Limit`, `Market`, `RangeMarket` Market with Protection Orders, `Reference`
price: 20000, # Order Price (float)
lot: 3, # Original order lot (int)
time_in_force: ROD, # Time In Force (TimeInForce): `ROD`, `FOK`, `IOC`
order_type: New, # Order Type (FutOptOrderType): `New`, `Close`, `Auto`, `FdayTrade` DayTrade
is_pre_order: False, # Reservation Order Flag (bool)
status: 10, # Order Status (int): `0` Reservation, `4` InQueue, `9` TimeOut, `10` New Order, `30` Cancel Order, `50` Fully Filled, `90` Order Failed
...
}]