That's all the message returned by KiteClient. e.message =
"Unknown `tradingsymbol`."
e.printStackTrace() =
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:282)
e.message = e.printStackTrace() = I can log
e.code
next time.You can check out the example here.
Rejected KiteOrder:
orderType: BUY
symbol: UDAICEMENT
priceE2: 2494
dPrice: 24.95
quantity: 401
ERROR: Unknown `tradingsymbol`.
KiteErrorCode: 400
___________________________________________________________
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = symbol.trim();
orderParams.product = Constants.PRODUCT_CNC;
orderParams.exchange = Constants.EXCHANGE_NSE;
orderParams.transactionType = orderType.trim();
orderParams.validity = Constants.VALIDITY_DAY;
orderParams.price = dPrice;
orderParams.tag = tag;
Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);
I was hard-coding `orderParams.exchange = Constants.EXCHANGE_NSE;` while placing the order, whereas using kite's `instrument_id` at other places.
Thanks anyway.