It looks like you're new here. If you want to get involved, click one of these buttons!
OrderParams{
exchange='NSE',
tradingsymbol='CANBK',
transactionType='SELL',
quantity=20,
price=88.3,
product='CNC',
orderType='SL-M',
validity='DAY',
disclosedQuantity=null,
triggerPrice=88.3,
squareoff=null,
stoploss=88.3,
trailingStoploss=null,
tag='null',
parentOrderId='null'
}
kiteConnect.placeOrder(slOrderParams, Constants.VARIETY_REGULAR);
You can observe the network requests in Chrome Dev tools.
Once I matched the requests, I was still getting an error. While trying to enable debugging logs, I learned a few more things.
I am putting my learnings up here for the benefit of others -
1. I was getting this exception in the kite logs - "20 quantity needs authorisation at the depository", related to https://kite.trade/forum/discussion/7813/important-new-authorisation-flow-for-cnc-equity-sells
2. To enable logging, I had to change the KiteConnect constructor I was calling to one which has a boolean enableLogging
3. Since I am also using selenium, enabling logging threw up runtime exceptions which were caused by OkHttp3 version conflicts between selenium and Kite libraries (this is even with a okhttp3 bom in place). I'm going to try and shift Selenium to a maven module of it's own, so that dependencies can have a level of separation.