I am using node and when I try to place order on kite API I get the following error on orderPlace.
TypeError: Cannot assign to read only property 'variety' of {"tradingsymbol":"CESC","exchange":"NSE","transaction_type":"Buy","quantity":1,"product" :"MIS","price":800}
could you please guide me on whats the issue here?
Hi @cmurthy, Check out placeOrder() method in this Example. You need to pass transaction_type in upper case (BUY), send variety in params. Check if other params that you are sending correct or not.
Hi Sujith, I still get the same error, below is the JSON I am passing. {"variety":"regular","tradingsymbol":"CESC","exchange":"NSE","transaction_type":"BUY","q uantity":1,"product":"MIS","price":800}
params.variety = variety === undefined ? "regular" : variety;
Check out placeOrder() method in this Example.
You need to pass transaction_type in upper case (BUY), send variety in params. Check if other params that you are sending correct or not.
I still get the same error, below is the JSON I am passing.
{"variety":"regular","tradingsymbol":"CESC","exchange":"NSE","transaction_type":"BUY","q
uantity":1,"product":"MIS","price":800}
I was doing a JSON.stringify() on params, but I forgot to remove this statement.
Once I removed this it is working fine.