AB2001 error when placing SELL order
-
Hello Sir @admin
I am getting the below error when placing SELL Order.
Programming Language : C# / DotnetError : AB2001
I am using below code:
OrderInfo ord = new OrderInfo();
ord.variety = "NORMAL";
ord.symboltoken = "154";
ord.tradingsymbol = "APCOTEXIND-EQ";
ord.transactiontype = "SELL";
ord.exchange = Constants.EXCHANGE_NSE;
ord.price = "0";
ord.ordertype = "MARKET";
ord.producttype = "DELIVERY";
ord.duration = "DAY";
ord.quantity = "1";
obj = connect.placeOrder(ord);
OrderResponse Ores = obj.PlaceOrderResponse;Please advise.
-
@admin
It's working now. I was missing below attributes.
squareoff":"0",
"stoploss":"0" -
Hi @asksameer Are you still facing the issue we didnt faced any issue
req :
{
"variety":"NORMAL",
"tradingsymbol":"SBIN-EQ",
"symboltoken":"3045",
"transactiontype":"SELL",
"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": "210623000000318"
}
} -
@admin
BUY order works. But sell order doesn't work. I am getting AB2001 error. -
Hi @asksameer Kinldy find the request and response of robo order orders are getting placed can you try now and update us.
req:
{
"variety":"ROBO",
"tradingsymbol":"SBIN-EQ",
"symboltoken":"3045",
"transactiontype":"BUY",
"exchange":"NSE",
"ordertype":"LIMIT",
"producttype":"BO",
"duration":"DAY",
"price":"421",
"squareoff":"12",
"stoploss":"6",
"quantity":"1"
Response:
{
"status": true,
"message": "SUCCESS",
"errorcode": "",
"data": {
"script": "SBIN-EQ",
"orderid": "210623000000015"
}
} -
@admin Can you please provide any update on this ?