Hi, I am trying to place a CM MARKET order with BO, but getting this error "Invalid `order_type` for that order variety.". Also, it is insisting that the 'price' field must be given.
So should I understand this as only LIMIT orders are supported with BO? The documentation says it can be LIMIT or MARKET and price is needed only for LIMIT.
Error: Invalid `order_type` for that order variety.
Should the order_type = "SL" instead of "MARKET"?
Usually the "trigger_price" parameter is used for specifying the stoploss for SL orders. But for BO the stoploss is specified in "stoploss" parameter (which is an incremental value, not absolute price like trigger_price).
So for BO, the system considers trigger_price parameter or stoploss parameter?
Yeah, you need to put order_type as LIMIT or SL , as per your requirement, not MARKET.Market order don't have Price param, as market orders are always placed at current best available price.So, "order_type" = "LIMIT", "price" = "245.3"
Don't use "takeprofit" = "2", it should be squareoff=2.
@rakeshr Now it is throwing the error "16423 : Invalid Trigger price entered ". Both parameters squareoff and stoploss have been given, with order_type="SL". What is missing now? Should I set the trigger_price to + ?
This error occurs when you enter invalid tick size when placing the Stop Loss [SL] order.Make sure, you are entering positive value with value multiple of 0.05.
Bracket Order supports LIMIT and SL order, so you need to enter price for either.Have look to required BO param in the documentation.
$order_id = $kite->placeOrder( "bo", [
"price" = "245.3",
"validity" = "DAY",
"tradingsymbol" = "TATAMOTORS-EQ",
"exchange" = "NSE",
"quantity" = "10",
"transaction_type" = "BUY",
"order_type" = "MARKET",
"stoploss" = "1",
"takeprofit" = "2",
"product" = "MIS"
]);
Error: Invalid `order_type` for that order variety.
Should the order_type = "SL" instead of "MARKET"?
Usually the "trigger_price" parameter is used for specifying the stoploss for SL orders. But for BO the stoploss is specified in "stoploss" parameter (which is an incremental value, not absolute price like trigger_price).
So for BO, the system considers trigger_price parameter or stoploss parameter?
Pls advise.
"order_type" = "LIMIT", "price" = "245.3"
Don't use
"takeprofit" = "2"
, it should besquareoff=2
.Many Thanks @rakeshr .
The step is lot size for quantity and disclosed quantity.