Request method not allowed error


I am using javascript api client for accessing kite api from a nodejs application. I am using [email protected]

I am using kiteConnect.placeOrder() function and I am getting "Request method not allowed" error and error_type as "GeneralException".
No further information is available.

Following are the parameters I am passing to the placeOrder function
variety: normal
orderParams: {"exchange":"NSE","tradingsymbol":"PEL","transaction_type":"BUY","quantity":1,"product":"MIS","order_type":"MARKET"}

Please advise on what could be going wrong here.

  • sujith
    Hey, there is no variety normal. I am guessing you are trying to place a regular order.
    You can check out the possible order variety values here.
  • sandeep
    Thanks Sujith. I changed the variety parameter to regular and it worked.

    A suggestion - if a parameter in the api call is not valid, giving more specific error would help in avoiding these kind of issues.
  • sujith
    This is an exception because the order variety becomes part of the route and not a body param. For other things, Kite Connect will throw an informative exception message and for more information about the type of Kite Connect exceptions, check out this section in the documentation.
Sign In or Register to comment.