Modify OPEN LIMIT order to MARKET order

iamshaurya
Hi

Can we convert an OPEN LIMIT order to MARKET order?
I tried using java client i simply received error "null" in response
OrderParams orderParams = new OrderParams();
orderParams.exchange = "NFO";
orderParams.tradingsymbol = "BANKNIFTY2171535700PE";
orderParams.orderType = ORDER_TYPE_MARKET;
orderParams.product = PRODUCT_NRML;
orderParams.validity = VALIDITY_DAY;
orderParams.transactionType = getTransactionType(model.getPosition());
this.getSdkClient().modifyOrder(orderId, orderParams, VARIETY_REGULAR);



This is the OrderParams payload sent
Order params for updating trade price {"exchange":"NFO","tradingsymbol":"BANKNIFTY2171535700PE","transactionType":"BUY","quantity":null,"price":null,"product":"NRML","orderType":"MARKET","validity":"DAY","disclosedQuantity":null,"triggerPrice":null,"squareoff":null,"stoploss":null,"trailingStoploss":null,"tag":null,"parentOrderId":null}

@sujith can you please help me if i am missing anything?
  • iamshaurya
    iamshaurya edited July 2021
    is it because am not sending
    quantity
    value?
    but if that is the case then am using same modifyOrder method to update price value for the LIMIT orders, that is working fine and there as well am not sending the quantity
    @rakeshr
  • sujith
    Your syntax looks fine. You can only send the values you want to modify. But tradingsymbol, exchange, variety, order id are mandatory. I was able to modify my order and got back order id in response.
    Please note that you will only receive order_id in the response order model.
  • sujith
    You can check raw response here. If an order is not modified then the reason will be there in the orderbook status message field.
    If there is a 400 series error then it will throw Kite Exception.
  • sujith
    Maybe run it in debug mode and see the raw response logs.
Sign In or Register to comment.