We have a valid KiteConnect subscription, but when placing an order using the Kite .NET API, I am getting this error, "Insufficient permission for that call" . I have made sure that the Zerodha Client Id that is used to initiate the Login flow is the same one that is authorized for the API in developer.kite.trade console.
Incidentally, I am able to get the holdings and positions without any problems.
Here is the code: var h = kite.GetHoldings();
var o = kite.PlaceOrder( Exchange: Constants.EXCHANGE_NSE, TradingSymbol: "KOLTEPATIL", TransactionType: Constants.TRANSACTION_TYPE_BUY, Quantity: 1, Product: Constants.PRODUCT_NRML, OrderType: Constants.ORDER_TYPE_MARKET, Validity: Constants.VALIDITY_DAY, Variety: Constants.VARIETY_AMO);
Here are the requests/responses: DEBUG: GET https://api.kite.trade/portfolio/holdings? DEBUG: User-Agent: KiteConnect.Net/1.0.0.0 DEBUG: X-Kite-Version: 3 DEBUG: Authorization: token inoguicx58omwhd9:Vh5Kdw0898o4D6UBA5Y32FGgvoHf3IBH DEBUG: 200 {"status":"success","data":[{"tradingsymbol":"CADILAHC","exchange":"BSE","instrument_token":136274180,"isin":"INE010B01027","product":"CNC","price":0,"quantity":465,"t1_quantity":0,"realised_quantity":465,"authorised_quantity":0,"opening_quantity":465,"collateral_quantity":0,"collateral_type":"","discrepancy":false,"average_price":429,"last_price":430.55,"close_price":430.55,"pnl":720.7500000000052,"day_change":0,"day_change_percentage":0},................................................
DEBUG: POST https://api.kite.trade/orders/amo exchange=NSE&tradingsymbol=KOLTEPATIL&transaction_type=BUY&quantity=1&product=NRML&order_type=MARKET&validity=DAY DEBUG: Content-Type: application/x-www-form-urlencoded DEBUG: User-Agent: KiteConnect.Net/1.0.0.0 DEBUG: X-Kite-Version: 3 DEBUG: Authorization: token inoguzcx58omwhd9:Vh5Kdw06o4fD96UBA5Y32FGgvoHf3IBH Exception thrown: 'System.Net.WebException' in System.dll DEBUG: 403 {"status":"error","message":"Insufficient permission for that call.","data":null,"error_type":"PermissionException"}
Exception thrown: 'KiteConnect.PermissionException' in KiteConnect.dll An unhandled exception of type 'KiteConnect.PermissionException' occurred in KiteConnect.dll Insufficient permission for that call.
Please don't paste app or client-specific details on the public threads, it can be misused. If you ever need to share session or client-specific details then use the private message feature on the forum. You seem to have created an app for masses, you need to use Kite Publisher to place orders. For more information, please write to compliance at kiteconnect(at)zerodha.com someone from the team will get back to you.
Hi even i am getting the same error while fetching historical data. The rest of things are working fine. I have a valid subscription for kite connect api as well as historical data.
You seem to have created an app for masses, you need to use Kite Publisher to place orders. For more information, please write to compliance at kiteconnect(at)zerodha.com someone from the team will get back to you.
You can go through Historical Data FAQs for insufficient permission call.
One has to re-generate the access token after subscribing for an add-on.