Batch Modify Price
batch_modify_price
First, using 'make_modify_price_obj' create a 'FutOptModifyPrice' object
Parameter | Type | Meaning |
---|---|---|
orderResult | FutOptOrderResult | The intended order result object to be modified |
price | string | The price after modification |
priceType | FutOptPriceType | The price type after modification |
caution
When 'price' is filled, priceType should be empty or None ; otherwise, the 'price' field should be empty or None
Put the returned object into the 'modify_price' function
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
ModifyPriceObj | FutOptModifyPrice (list of object) | The object for price modification |
Result Response
Parameter | Type | Meaning |
---|---|---|
is_success | bool | Interface result |
data | List | Modified content is returned |
message | string | is_success = False error description is returned |
FutOptOrderResult Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
function_type | int | Function Type : 0 New 、10 Execute New、 15 Amend Price 、 20 Amend Lot 、 30 Cancel、90 Failed |
date | string | Transaction Date |
seq_no | string | Order Serial Number |
branch_no | string | Branch Number |
account | string | Account |
order_no | string | Order Number |
asset_type | int | Asset Type : 1 Future 、2 Option |
market | string | Market Type : TAIMEX Future、Option |
market_type | FutOptMarketType | Trading Session Type : Future 、 Option 、 FutureNight After-Hour Future、 OptionNight After-Hour Option |
unit | int | Unit |
currency | string | Trading Currency |
symbol | string | Symbol |
expiry_date | string | Expiry Date |
strike_price | float | Strike Price |
call_put | CallPut | Call / Put : Call 、Put |
buy_sell | BSAction | Buy/Sell Type : Buy 、 Sell |
symbol_leg2 | string | Spread Symbol |
expiry_date_leg2 | string | Expiry Date - Spread Order |
strike_price_leg2 | float | Strike Price - Spread Order |
call_put_leg2 | CallPut | Call / Put : Call 、Put |
buy_sell_leg2 | BSAction | Buy/Sell Type - Spread Order: Buy 、 Sell |
price_type | FutOptPriceType | Original Order Price Type : Limit 、 Market 、RangeMarket Market with Protection Orders 、 Reference |
price | float | Order Price |
lots | int | Original Order Lot |
time_in_force | TimeInForce | Time In Force : ROD FOK 、 IOC |
order_type | FutOptOrderType | Order Type : New 、 Close 、 Auto 、 FdayTrade DayTrade |
is_pre_order | bool | Reservation Order Flag |
status | int | 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 |
after_price_type | FutOptPriceType | Valid Order Price Type : Limit Market 、RangeMarket Market with Protection Orders 、 Reference |
after_price | float | Valid Order Price |
after_lot | int | Valid Order Lot |
filled_lot | int | Filled Lot |
filled_money | float | Filled Value |
before_lot | int | Before the Lot Modification |
before_price | float | Before the Price Modification |
user_def | string | Custom Fields |
last_time | string | Last Modification Time |
details | list | Order Process (Return value when query order_result_detail or order_history ) |
error_message | string | Error Message |
Request Example
# Batch price modification ( modifying orders using the content returned by batch detail )
modify_objects = [
sdk.futopt.make_modify_price_obj(batch_results_detail.data[0], "19900"),
sdk.futopt.make_modify_price_obj(batch_results_detail.data[1], "19900"),
]
sdk.futopt.batch_modify_price(target_user, modify_objects)
# Batch price modification ( Using different individual orders )
modify_objects = [
sdk.futopt.make_modify_price_obj(orders.data[37], "19900"),
sdk.futopt.make_modify_price_obj(orders.data[35], "19900"),
]
sdk.futopt.batch_modify_price(target_user, modify_objects)
回傳範例
Result {
is_success: True,
message: None,
data :[
FutOptOrderResult{ # Batch price modification ( modifying orders using the content returned by batch detail )
function_type: 15, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "00110212563", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "C0017", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: Future, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FITX", # Symbol (string)
expiry_date: "0", # Expiry Date (string)
strike_price: 0, # Strike Price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Spread Symbol (string)
expiry_date_leg2: None, # Expiry Date - Spread Order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (CallPut)
buy_sell_leg2: None, # Buy/Sell Type - 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: 1, # 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: 19900, # Valid Order Price (float)
after_lot: 1, # Valid Order Lot (int)
filled_lot: 0, # Filled Lot (int)
filled_money: 0, # Filled Value (int)
before_lot: 0, # Before the Lot Modification (int)
before_price: 20000, # Before the Price Modification (float)
user_def: None, # Custom Fields (string)
last_time: "13:39:55", # Last Modification Time (string)
details: None, # Order Process (list)
error_message: None # Error Message (string)
},
FutOptOrderResult{
function_type: 15, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "00110212564", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "C0018", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: Future, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FITX", # Symbol (string)
expiry_date: "0", # Expiry Date (string)
strike_price: 0, # Strike Price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Spread Symbol (string)
expiry_date_leg2: None, # Expiry Date - Spread Order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (CallPut)
buy_sell_leg2: None, # Buy/Sell Type - 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: 1, # 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
...
}]
}
Below example only extract data content
[FutOptOrderResult({ # Batch price modification ( Using different individual orders )
function_type: 15, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "00110212863", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "C0020", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: Future, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FITX", # Symbol (string)
expiry_date: "0", # Expiry Date (string)
strike_price: 0, # Strike Price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Spread Symbol (string)
expiry_date_leg2: None, # Expiry Date - Spread Order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (CallPut)
buy_sell_leg2: None, # Buy/Sell Type - 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: 1, # 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: 19900, # Valid Order Price (float)
after_lot: 1, # Valid Order Lot (int)
filled_lot: 0, # Filled Lot (int)
filled_money: 0, # Filled Value (int)
before_lot: 0, # Before the Lot Modification (int)
before_price: 20000, # Before the Price Modification (float)
user_def: None, # Custom Fields (string)
last_time: "13:40:05", # Last Modification Time (string)
details: None, # Order Process (list)
error_message: None # Error Message (string)
},
FutOptOrderResult{
function_type: 15, # Function Type (int)
date: "2024/03/25", # Transaction Date (string)
seq_no: "00110212864", # Order Serial Number (string)
branch_no: "15901", # Branch Number (string)
account: "1234567", # Account (string)
order_no: "C0021", # Order Number (string)
asset_type: 1, # Asset Type (int): `1` Future, `2` Option
market: "TAIMEX", # Market Type (string)
market_type: Future, # Trading Session Type (FutOptMarketType): `Future`, `Option`, `FutureNight` After-Hour Future, `OptionNight` After-Hour Option
unit: None, # Unit (int)
currency: "TWD", # Trading Currency (string)
symbol: "FITX", # Symbol (string)
expiry_date: "0", # Expiry Date (string)
strike_price: 0, # Strike Price (float)
call_put: None, # Call / Put (CallPut)
buy_sell: Buy, # Buy/Sell Type (BSAction): `Buy`, `Sell`
symbol_leg2: None, # Spread Symbol (string)
expiry_date_leg2: None, # Expiry Date - Spread Order (string)
strike_price_leg2: None, # Strike Price - Spread Order (float)
call_put_leg2: None, # Call / Put - Spread Order (CallPut)
buy_sell_leg2: None, # Buy/Sell Type - 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: 1, # 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
...
})]