Order Placing API return no response
-
Hi @admin and other fellow coders
I am refferring to the symbol token in the link given here
I tried to place order in the below code-
paceSLorder_payload = "{\n\"exchange\": \"NFO\",\n\"tradingsymbol\": \"BANKNIFTY21JAN2132600PE\",\n\ \"quantity\": 25, \ \n\"disclosedquantity\": 25,\ \n\"symboltoken\": 58068,\ \n \"transactiontype\": \"BUY\",\ \n \"ordertype\": \"LIMIT\",\ \n \"duration\": \"DAY\",\ \n \"variety\": \"STOPLOSS_LIMIT\",\ \n \"triggerprice\": \"800\",\ \n \"price\": \"805\",\ \n \"producttype\": \"INTRADAY\"\ \n}" conn.request("POST", "/rest/secure/angelbroking/order/v1/placeOrder",\ placeSLorder_payload,\ headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
I get the following error-
{"message":"Entered trading symbol and symbol token is mismatch","errorcode":"AB1019","status":false,"data":null}
If you see the symbol and token value is correct. Why do i get this error?
-
@sachinsrm order placement is successful - status of the order is what you are seeing in the web
-
@sandipkhairnar
Hi,
Thanks!
Now getting the responses.
API response getting Success but when checking into the trading panel:
https://trade.angelbroking.com/
it shows Order Rejected. -
@sachinsrm There is missing "duration":"DAY" in place order request body.
-
@rajanprabu
Hi, thanks for the response. Now updating MIS to INTRADAY, Response is coming.
For given input"variety" => "NORMAL", "tradingsymbol" => "RELIANCE-EQ", "symboltoken" => "2885", "exchange" => "NSE", "quantity" => "1", "transactiontype" => "BUY", "ordertype" => "MARKET", "producttype" => "INTRADAY"
following response is coming:
AB2001 : Internal Error
How can this issue be handled? -
@sachinsrm There is no MIS. its INTRADAY.. I have attached the table below for your reference.
-
@sandipkhairnar
Hi, Thanks for response again.Tried as you have suggested; but not getting the any response. Once again getting an empty result.
Not receiving success or error response. -
@sachinsrm Please try with below request.
{
"variety":"NORMAL",
"tradingsymbol":"RELIANCE-EQ",
"symboltoken":"2885",
"transactiontype":"BUY",
"exchange":"NSE",
"ordertype":"MARKET",
"producttype":"MIS",
"duration":"DAY",
"price":"0",
"quantity":"1"
} -
@sandipkhairnar
hi, thanks for the response; I have updated the variety parameter to "NORMAL"; but there is no change in response. Nothing is return. -
Hi @sachinsrm variety parameter should either be NORMAL, STOPLOSS or AMO. Please refer https://smartapi.angelbroking.com/docs/Orders#place