MARKET order with BO not supported?

ramatius
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.

Pls clarify. I am using the PHP client.

Regards,
Ramakrishnan S
  • rakeshr
    @ramatius
    Bracket Order supports LIMIT and SL order, so you need to enter price for either.Have look to required BO param in the documentation.
  • ramatius
    @rakeshr The following call is throwing an error,

    $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.
  • rakeshr
    @ramatius
    Should the order_type = "SL" instead of "MARKET"?
    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.
  • ramatius
    Let me try with SL & see.
    Many Thanks @rakeshr .
  • ramatius
    @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 + ?

  • rakeshr
    @ramatius
    "16423 : Invalid Trigger price entered "
    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.
  • ramatius
    Thanks @rakeshr SL order is working now. Pls update the documentation with this 0.05 step constraint.
  • sujith
    The step is tick size and not 0.05 for all instruments. It holds true for all price fields.
    The step is lot size for quantity and disclosed quantity.
This discussion has been closed.