PermissionException while placing an order

ruchanavjyot1907
ruchanavjyot1907 edited April 2018 in Java client
I am getting PermissionException while placing a new order. Same order worked fine till yesterday night. Please investigate at earliest and let me know which permission is missing. PFB logs of response received from Kite API.
2018-04-18 10:12:21.407 [ReadingThread] INFO - --> POST https://api.kite.trade/orders/regular HTTP/1.1
2018-04-18 10:12:21.407 [ReadingThread] INFO - Content-Type: application/x-www-form-urlencoded
2018-04-18 10:12:21.407 [ReadingThread] INFO - Content-Length: 125
2018-04-18 10:12:21.407 [ReadingThread] INFO - User-Agent: javakiteconnect/3.0.0
2018-04-18 10:12:21.407 [ReadingThread] INFO - X-Kite-Version: 3
2018-04-18 10:12:21.407 [ReadingThread] INFO - Authorization: token nulkslt2ca33ddlk:BY97tptqzmxUlffhg7lnbdHbLeUtd54g
2018-04-18 10:12:21.407 [ReadingThread] INFO -
2018-04-18 10:12:21.407 [ReadingThread] INFO - product=MIS&quantity=1&price=207.0&tradingsymbol=ZINC18APRFUT&exchange=MCX&validity=DAY&transaction_type=BUY&order_type=LIMIT
2018-04-18 10:12:21.407 [ReadingThread] INFO - --> END POST (125-byte body)
2018-04-18 10:12:21.688 [ReadingThread] INFO - <-- 403 Forbidden https://api.kite.trade/orders/regular (272ms)
2018-04-18 10:12:21.688 [ReadingThread] INFO - Server: nginx
2018-04-18 10:12:21.688 [ReadingThread] INFO - Date: Wed, 18 Apr 2018 04:42:21 GMT
2018-04-18 10:12:21.688 [ReadingThread] INFO - Content-Type: application/json
2018-04-18 10:12:21.688 [ReadingThread] INFO - Content-Length: 116
2018-04-18 10:12:21.688 [ReadingThread] INFO - Connection: keep-alive
2018-04-18 10:12:21.688 [ReadingThread] INFO - OkHttp-Sent-Millis: 1524026541672
2018-04-18 10:12:21.688 [ReadingThread] INFO - OkHttp-Received-Millis: 1524026541688
2018-04-18 10:12:21.688 [ReadingThread] INFO -
2018-04-18 10:12:21.688 [ReadingThread] INFO - {"status":"error","message":"Insufficient permission for that call.","data":null,"error_type":"PermissionException"}
2018-04-18 10:12:21.688 [ReadingThread] INFO - <-- END HTTP (116-byte body)
2018-04-18 10:12:21.704 [ReadingThread] INFO - --> POST https://api.kite.trade/orders/regular HTTP/1.1
2018-04-18 10:12:21.704 [ReadingThread] INFO - Content-Type: application/x-www-form-urlencoded
2018-04-18 10:12:21.704 [ReadingThread] INFO - Content-Length: 126
2018-04-18 10:12:21.704 [ReadingThread] INFO - User-Agent: javakiteconnect/3.0.0
2018-04-18 10:12:21.704 [ReadingThread] INFO - X-Kite-Version: 3
2018-04-18 10:12:21.704 [ReadingThread] INFO - Authorization: token
apikeyxxxx:accesstokenxxxx
2018-04-18 10:12:21.719 [ReadingThread] INFO -
2018-04-18 10:12:21.719 [ReadingThread] INFO - product=MIS&quantity=1&price=207.1&tradingsymbol=ZINC18APRFUT&exchange=MCX&validity=DAY&transaction_type=SELL&order_type=LIMIT
2018-04-18 10:12:21.719 [ReadingThread] INFO - --> END POST (126-byte body)
2018-04-18 10:12:21.814 [ReadingThread] INFO - <-- 403 Forbidden https://api.kite.trade/orders/regular (109ms)
2018-04-18 10:12:21.829 [ReadingThread] INFO - Server: nginx
2018-04-18 10:12:21.829 [ReadingThread] INFO - Date: Wed, 18 Apr 2018 04:42:21 GMT
2018-04-18 10:12:21.829 [ReadingThread] INFO - Content-Type: application/json
2018-04-18 10:12:21.829 [ReadingThread] INFO - Content-Length: 116
2018-04-18 10:12:21.829 [ReadingThread] INFO - Connection: keep-alive
2018-04-18 10:12:21.829 [ReadingThread] INFO - OkHttp-Sent-Millis: 1524026541814
2018-04-18 10:12:21.829 [ReadingThread] INFO - OkHttp-Received-Millis: 1524026541814
2018-04-18 10:12:21.829 [ReadingThread] INFO -
2018-04-18 10:12:21.829 [ReadingThread] INFO - {"status":"error","message":"Insufficient permission for that call.","data":null,"error_type":"PermissionException"}
2018-04-18 10:12:21.829 [ReadingThread] INFO - <-- END HTTP (116-byte body)</blockquote>
  • ruchanavjyot1907
    After restarting the application, now I am unable to connect to socket. Please help urgently.
    2018-04-18 10:33:52.353 [main] INFO com.TradeRobotScalperBatch.batch.TradeRobotScalperBatchConfiguration.kiteTicker - Initializing Bean: kiteTicker
    com.neovisionaries.ws.client.OpeningHandshakeException: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 403 Forbidden
    at com.neovisionaries.ws.client.HandshakeReader.validateStatusLine(HandshakeReader.java:232)
    at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:54)
    at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3113)
    at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:2992)
    at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2034)
    at com.TradeRobotScalperBatch.api.kiteAPI.zerodhatech.ticker.KiteTicker.connect(KiteTicker.java:195)
  • sujith
    Can you log out and re-login? We will look into this.
Sign In or Register to comment.