Place AutoTrader Cover Order
Place a cover order with a stoploss (and optional trailing stoploss) that works on every broker.
https://apix.stocksdeveloper.in/trading/placeAutoTraderCoverOrder The Place AutoTrader Cover Order call places our own cover order — an ordinary intraday entry with a stoploss, and no target, watched by AutoTrader Web. Unlike Place Cover Order, which uses your broker's cover order and works only where your broker offers one, this works on every broker we support. Note the difference in how the stop is given: a broker cover order takes an absolute stop price in triggerPrice, while this call takes a distance in rupees from your entry price in stoploss. It is available in Python, Java, C# and the HTTP REST API.
This call places an AutoTrader cover order (AT_CO) — a stoploss with no target. Your entry goes to your broker as an ordinary intraday order, and AutoTrader Web watches the price and closes the position when your stoploss is reached, so it works on every broker we support.
This is a different call from Place Cover Order, which uses your broker’s cover order and is unchanged.
⚠️ The stop is given differently from a broker cover order
This is the one thing to get right when moving across:
| Where the stop goes | What the number means | |
|---|---|---|
| Place Cover Order (your broker’s) | triggerPrice | The stop price itself — e.g. 178 |
| Place AutoTrader Cover Order | stoploss | Rupees away from your entry price — e.g. 2.5 |
There is no triggerPrice parameter on this call at all. On a buy filled at 180.50, stoploss=2.5 closes the position at 178.00.
You can also pass a trailingStoploss: the step the stop moves in each time the price advances by that much. It needs the stoploss alongside it to say how far behind the price the stop sits. See Bracket & Cover Orders for the full explanation and an interactive example.
Three things this call does not do: it does not give you the extra intraday margin some brokers give on their own cover orders, it is intraday only and squares itself off before the market closes, and your stoploss is watched by AutoTrader Web rather than resting at the exchange.
Code samples
HTTP
Example
curl https://apix.stocksdeveloper.in/trading/placeAutoTraderCoverOrder \
-H "api-key: <your-api-key>" \
-d "pseudoAccount=ACC_NICK_NAME" \
-d "exchange=<exchange>" \
-d "symbol=SBIN" \
-d "tradeType=BUY" \
-d "orderType=LIMIT" \
-d "quantity=10" \
-d "price=180.5" \
-d "stoploss=2.5" \
-d "trailingStoploss=1"Response
{
"result":"200622000335719",
"error":null,
"message":null,
"status":true,
"commandId":"9b87532c-cade-49d3-8ace-76db7be63029"
}The response fields work as follows:
| Field | Meaning |
|---|---|
result | The order id given by your trading platform, for the entry order. |
status | true on success. On error, it is false and message holds the error text. |
commandId | Used to trace the activity on AutoTrader Web. |
Python
Signature
def place_autotrader_cover_order(self, pseudo_account, \
exchange, symbol, tradeType, orderType, \
quantity, price, stoploss, trailingStoploss=0.0):Example
response = autotrader.place_autotrader_cover_order( \
'ACC_NICK_NAME', '<exchange>', 'SBIN', 'BUY', 'LIMIT', \
10, 180.5, 2.5, 1)
if response.success():
print("Result: {0}".format(response.result))
else:
print("Message: {0}".format(response.message))Java
Signature
/**
* Places an AutoTrader cover order.
*
* @param pseudoAccount pseudo account
* @param exchange exchange
* @param symbol symbol
* @param tradeType trade type
* @param orderType order type
* @param quantity quantity
* @param price price
* @param stoploss stoploss, in rupees away from your entry price
* @param trailingStoploss trailing stoploss step, in rupees
* @return the order id given by your stock broker
*/
IOperationResponse<String> placeAutoTraderCoverOrder(
String pseudoAccount, String exchange, String symbol,
TradeType tradeType, OrderType orderType, int quantity,
float price, float stoploss, float trailingStoploss);Example
// Place an AutoTrader cover order
final IOperationResponse<String> response = autotrader
.placeAutoTraderCoverOrder("ACC_NICK_NAME", "<exchange>", "SBIN",
TradeType.BUY, OrderType.LIMIT,
10, 180.5f, 2.5f, 1f);
// Read order id
String orderId = null;
if (response.success()) {
orderId = response.getResult();
} else {
final String errorMessage = response.getMessage();
}C#
Signature
/// <summary>
/// Places an AutoTrader cover order.
/// </summary>
/// <param name="pseudoAccount"> pseudo account </param>
/// <param name="exchange"> exchange </param>
/// <param name="symbol"> symbol </param>
/// <param name="tradeType"> trade type </param>
/// <param name="orderType"> order type </param>
/// <param name="quantity"> quantity </param>
/// <param name="price"> price </param>
/// <param name="stoploss"> stoploss, in rupees away from your entry price </param>
/// <param name="trailingStoploss"> trailing stoploss step, in rupees </param>
/// <returns> the order id given by your stock broker </returns>
IOperationResponse<String> PlaceAutoTraderCoverOrder(
string pseudoAccount, string exchange,
string symbol, TradeType tradeType,
OrderType orderType, int quantity,
float price, float stoploss, float trailingStoploss);Example
IOperationResponse<string> response =
autoTrader.PlaceAutoTraderCoverOrder("ACC_NICK_NAME",
"<exchange>", "SBIN", TradeType.BUY,
OrderType.LIMIT, 10, 180.5f, 2.5f, 1);
if(response.Success()) {
Console.WriteLine("Result: {0}", response.Result);
}
else {
Console.WriteLine("Message: {0}", response.Message);
}Parameters
| Parameter | Description |
|---|---|
| account | nickname of the broker account (also known as pseudo account) |
| exchange | instrument (stock/derivative) exchange |
| symbol | instrument (stock/derivative) symbol |
| tradeType | trade type |
| orderType | order type — LIMIT or MARKET |
| quantity | quantity |
| price | order price |
| stoploss | stoploss, in rupees away from your entry price. Required. |
| trailingStoploss | trailing stoploss step, in rupees. Pass zero for a stop that does not move. |
There is no triggerPrice and no target on this call. A cover order has no target — use Place AutoTrader Bracket Order if you want one. There is no productType either: an AutoTrader cover order is always intraday.
Note on quantity: For derivatives on Indian stock exchanges, quantity should be a multiple of the lot size. This call cannot be split across the exchange’s maximum quantity for a single order — send a quantity within the limit, or place several separate orders.
Return value
The call returns the order id given by your trading platform.
The call returns the library order id. The Desktop Client passes the request on to your broker.
Notes
- You must agree to the terms once, before your first AutoTrader bracket or cover order. Until you do, this call is rejected with a message telling you so.
- One at a time per symbol. A second AutoTrader bracket or cover order on the same account and symbol is rejected while the first is running.
- To change the stoploss after placing, use AutoTrader Web — open the Positions tab and click the
AT_COtag on the row. There are no API functions for this yet. - To close the position now, use Square Off Position; to cancel an entry that has not filled, use Cancel Order. The cover order ends with either.
- Needs a recent library version. These calls were added in Python 1.4.0, Java 3.2.0 and C# 1.4.0. If your editor does not offer the function, upgrade the library — see client setup. The HTTP REST call needs nothing installed.
- Not yet available in Excel, AmiBroker or MetaTrader. Use Place Cover Order there, or the HTTP REST call above.
For related order types, see Place AutoTrader Bracket Order, Place Cover Order and Place Advanced Order.
Thanks for the feedback. Still stuck? Contact support.
Last updated 8 August 2026