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"}
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.
You can check out the possible order variety values here.
A suggestion - if a parameter in the api call is not valid, giving more specific error would help in avoiding these kind of issues.