Place order doesnt work always
-
Hi,
I am trying to place order, but I am getting the exception.
orderparams = { "variety": "NORMAL", "tradingsymbol": "NBCC-EQ", "symboltoken": "31415", "transactiontype": "BUY", "exchange": "NSE", "ordertype": "LIMIT", "producttype": "INTRADAY", "duration": "DAY", "price": "MARKET", "squareoff": "0", "stoploss": "0", "quantity": "1" }
Kindly help
raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format( smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b''
-
@admin okay. thank you for your prompt reply
-
HI @mahasamrat put it 0.
-
@admin If order type is market,
"ordertype":"MARKET",
what is the need to mention the price in order?
"price":"421"
What I mean to say is, while placing auto orders, prices can be changed. Is there any way with which "price" field can be based on market value ?
In that case we don't require to give the price? -
Hi @mahasamrat refer below payload:
request:
{
"variety":"NORMAL",
"tradingsymbol":"SBIN-EQ",
"symboltoken":"3045",
"transactiontype":"BUY",
"exchange":"NSE",
"ordertype":"MARKET",
"producttype":"INTRADAY",
"duration":"DAY",
"price":"421",
"squareoff":"0",
"stoploss":"0",
"quantity":"1"response:
{
"status": true,
"message": "SUCCESS",
"errorcode": "",
"data": {
"script": "SBIN-EQ",
"orderid": "210614000000031"
}
} -
@mahasamrat said in Place order doesnt work always:
"price": "MARKET",
I tried various options, when I enter
"price": "MARKET",
it wont take. why we cant place order on market price?