New Cover Order for NIFTY Nov Fut

sudipto
I am trying to place a new cover order for NIFTY 19 Nov Fut...
I want to place the order at Market price with a specified Stop loss...
Below is the order object I am sending...

exchange: NFO
tradingsymbol: NIFTY
transactionType: BUY
quantity: 75
price: null
product: MIS
orderType: MARKET
validity: DAY
disclosedQuantity: null
triggerPrice: 11922.3
squareoff: null
stoploss: null
trailingStoploss: null
tag: Z0000000
parentOrderId: null

I am getting the following exception... The message in the exception is null, so I can't figure out what I am doing wrong.

com.zerodhatech.kiteconnect.kitehttp.exceptions.InputException
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:54)
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.postRequest(KiteRequestHandler.java:85)
at com.zerodhatech.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:290)
at com.easyhotelier.kite.trade.LiveTrade.newCoverOrder(LiveTrade.java:91)
at com.easyhotelier.kite.trade.TickDispatcher.put(TickDispatcher.java:82)
at com.easyhotelier.kite.trade.LiveTrade.onTickerArrival(LiveTrade.java:64)
at com.easyhotelier.kite.server.DayOpener.lambda$4(DayOpener.java:129)
at com.zerodhatech.ticker.KiteTicker$3.onBinaryMessage(KiteTicker.java:275)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
  • sudipto
    ... and I am making the call to place the order by using this method...
    kiteConnect.placeOrder(orderParams, Constants.VARIETY_CO);
  • sujith
    You can check out an example here.

    You seem to be passing a wrong tradingsymbol. You need to pass correct tradingsymbol which can be found inside the instrument master dump.

    You can always run javakiteconnect in debug mode to see all the logs which includes request and response logs.
  • sudipto
    Thanks... I got the mistake. Sorry for making such a rookie mistake. :smile:
This discussion has been closed.