It looks like you're new here. If you want to get involved, click one of these buttons!
"message": "Invalid JSON payload in `data`.",
<form method="post" id="basket-form" action="https://kite.zerodha.com/connect/basket"> <input type="hidden" name="api_key" value="xxx" /> <input type="hidden" id="basket" name="data" value="" /></form>
<!DOCTYPE html>
Kite Connect Basket Order Test
document.getElementById("basket").value = [{
"variety": "regular",
"tradingsymbol": "INFY",
"exchange": "NSE",
"transaction_type": "BUY",
"order_type": "MARKET",
"quantity": 10,
"readonly": false
}, {
"variety": "regular",
"tradingsymbol": "NIFTY21DECFUT",
"exchange": "NFO",
"transaction_type": "SELL",
"order_type": "LIMIT",
"price": 7845,
"quantity": 1,
"readonly": false
},
{
"variety": "bo",
"tradingsymbol": "RELIANCE",
"exchange": "NSE",
"transaction_type": "BUY",
"order_type": "LIMIT",
"product": "MIS",
"price": 915.15,
"quantity": 1,
"stoploss": 5,
"squareoff": 7,
"trailing_stoploss": 1.5,
"readonly": true
}]
document.getElementById("basket-form").submit();
I am getting the same following error:
{"status":"error","message":"Invalid JSON payload in `data`.","data":null,"error_type":"InputException"}
this section:
The above link contains the publisher code.