Orders API
Execute trades, manage positions, and monitor order lifecycles with comprehensive programmatic access to stock market trading operations across multiple exchanges.
Overview
The Orders API provides enterprise-grade trading capabilities with real-time order management, portfolio tracking, and detailed execution analytics. Built for algorithmic trading, portfolio management platforms, and advanced trading applications.
Key Features
- Multi-Exchange Trading: Execute orders across NSE, BSE, NFO, BFO, and MCX
- Real-Time Management: Instant order modifications and cancellations
- Complete Order Lifecycle: Track orders from placement to execution
- Risk Management: Built-in stop-loss and cover order protection
- Portfolio Analytics: Comprehensive trade books and performance tracking
Base Configuration
Authentication & Headers
All API requests require the following authentication headers:
| Header | Type | Required | Description |
|---|---|---|---|
appID |
string | ✓ | Your application identifier |
token |
string | ✓ | User authentication token |
Content-Type |
string | ✓ | Must be application/json |
Base URL
Endpoint Reference
| Method | Endpoint | Description |
|---|---|---|
POST |
/order/:variety |
Place new trading orders |
PATCH |
/order/:variety/:order_id |
Modify existing open orders |
DELETE |
/order/:variety/:order_id |
Cancel pending orders |
GET |
/order/:order_id |
Retrieve order details and history |
GET |
/user/orders |
Get complete order book |
GET |
/user/trades |
Access executed trades |
Trading Parameters
Order Varieties
| Variety | Description | Risk Management |
|---|---|---|
regular |
Standard order execution | Basic order controls |
Exchange Support
| Exchange | Code | Market Segment | Trading Hours |
|---|---|---|---|
| NSE | NSE |
Equity | 9:15 AM - 3:30 PM |
| NFO | NFO |
Futures & Options | 9:15 AM - 3:30 PM |
| BSE | BSE |
Equity | 9:15 AM - 3:30 PM |
| BFO | BFO |
Futures & Options | 9:15 AM - 3:30 PM |
| MCX | MCX |
Commodities | 9:00 AM - 11:30 PM |
Order Types
| Type | Code | Description | Use Case |
|---|---|---|---|
| Market Order | MKT |
Execute at best available price | Immediate execution required |
| Limit Order | LMT |
Execute at specified price or better | Price control priority |
| Stop Loss Limit | SL-LMT |
Limit order activated at trigger | Risk management with price control |
| Stop Loss Market | SL-MKT |
Market order activated at trigger | Risk management with speed priority |
Product Categories
| Product | Code | Description | Settlement |
|---|---|---|---|
| Intraday | I |
Same-day position closure | Auto-squared off |
| Delivery | C |
Equity delivery orders | T+2 settlement |
| Normal | M |
F&O orders | Standard margin |
Order Validity
| Validity | Code | Description | Expiry |
|---|---|---|---|
| Day Order | DAY |
Valid until market close | End of trading session |
| Immediate or Cancel | IOC |
Execute immediately or cancel | Immediate |
Order Execution
Place Regular Order
Execute standard trading orders with full parameter control.
Endpoint Details
Method: POST
URL: /order/regular
Authentication: Required (appID + token)
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exchange |
string | ✓ | Exchange identifier (NSE, NFO, BSE, etc.) |
token |
string | ✓ | Instrument token |
symbol |
string | ✓ | Trading symbol |
quantity |
string | ✓ | Order quantity |
transactionType |
string | ✓ | Transaction type (B = Buy, S = Sell) |
order |
string | ✓ | Order type (LMT, MKT, SL-LMT, SL-MKT) |
product |
string | ✓ | Product type (I, C, M) |
price |
string | ✓ | Order price (use "0" for market orders) |
validity |
string | ✓ | Order validity (DAY, IOC) |
disclosedQty |
string | - | Disclosed quantity for iceberg orders |
triggerPrice |
string | - | Trigger price for stop-loss orders |
tags |
string | - | Custom tags for order identification |
amo |
boolean | - | After market order flag |
Place Regular Order
curl --location 'https://edge.arrow.trade/order/regular' \
--header 'appID: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"exchange": "NSE",
"quantity": "2",
"disclosedQty": "0",
"product": "I",
"symbol": "RELIANCE-EQ",
"transactionType": "B",
"order": "MKT",
"price": "0",
"validity": "DAY",
"tags": "strategy_1",
"amo": false,
"triggerPrice": "0"
}'
const orderData = {
exchange: "NSE",
quantity: "2",
disclosedQty: "0",
product: "I",
symbol: "RELIANCE-EQ",
transactionType: "B",
order: "MKT",
price: "0",
validity: "DAY",
tags: "strategy_1",
amo: false,
triggerPrice: "0"
};
const response = await fetch('https://edge.arrow.trade/order/regular', {
method: 'POST',
headers: {
'appID': '<YOUR_APP_ID>',
'token': '<YOUR_TOKEN>',
'Content-Type': 'application/json'
},
body: JSON.stringify(orderData)
});
const result = await response.json();
import requests
headers = {
'appID': '<YOUR_APP_ID>',
'token': '<YOUR_TOKEN>',
'Content-Type': 'application/json'
}
payload = {
"exchange": "NSE",
"quantity": "2",
"disclosedQty": "0",
"product": "I",
"symbol": "RELIANCE-EQ",
"transactionType": "B",
"order": "MKT",
"price": "0",
"validity": "DAY",
"tags": "strategy_1",
"amo": False,
"triggerPrice": "0"
}
response = requests.post(
'https://edge.arrow.trade/order/regular',
headers=headers,
json=payload
)
result = response.json()
Success Response
{
"data": {
"orderNo": "24012400000321",
"requestTime": "21:45:55 24-01-2024"
},
"status": "success"
}
Cancel Order
Cancel pending orders that are no longer required.
Endpoint Details
Method: DELETE
URL: /order/:variety/:order_id
Authentication: Required (appID + token)
Request Example
Success Response
Order Tracking
Get Order Details
Retrieve comprehensive order history and execution details for specific orders.
Endpoint Details
Method: GET
URL: /order/:order_id
Authentication: Required (appID + token)
Request Example
Response Schema
{
"data": [
{
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NSE",
"symbol": "IDEA-EQ",
"id": "25091801000003",
"rejectReason": "",
"price": "7.75",
"quantity": "1",
"marketProtection": "",
"product": "C",
"orderStatus": "COMPLETE",
"reportType": "Fill",
"transactionType": "B",
"order": "LMT",
"fillShares": "1",
"averagePrice": "7.75",
"exchangeOrderID": "1100000002775838",
"cancelQuantity": "0",
"remarks": "0",
"disclosedQuantity": "",
"orderTriggerPrice": "",
"validity": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "1",
"lotSize": "1",
"token": "14366",
"orderTime": "2025-09-18T09:21:47",
"exchangeUpdateTime": "",
"exchangeTime": "2025-09-18T09:21:47",
"orderSource": "1",
"isAck": false,
"leavesQuantity": "0"
},
{
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NSE",
"symbol": "IDEA-EQ",
"id": "25091801000003",
"rejectReason": "",
"price": "7.75",
"quantity": "1",
"marketProtection": "",
"product": "C",
"orderStatus": "OPEN",
"reportType": "NewAck",
"transactionType": "B",
"order": "LMT",
"fillShares": "0",
"averagePrice": "0",
"exchangeOrderID": "1100000002775838",
"cancelQuantity": "0",
"remarks": "0",
"disclosedQuantity": "",
"orderTriggerPrice": "",
"validity": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "1",
"lotSize": "1",
"token": "14366",
"orderTime": "2025-09-18T09:21:44",
"exchangeUpdateTime": "",
"exchangeTime": "",
"orderSource": "1",
"isAck": false,
"leavesQuantity": "1"
},
{
"userID": "AJ0001",
"accountID": "AJ0001",
"exchange": "NSE",
"symbol": "IDEA-EQ",
"id": "25091801000003",
"rejectReason": "",
"price": "7.75",
"quantity": "1",
"marketProtection": "",
"product": "C",
"orderStatus": "PENDING",
"reportType": "PendingNew",
"transactionType": "B",
"order": "LMT",
"fillShares": "0",
"averagePrice": "0",
"exchangeOrderID": "0",
"cancelQuantity": "0",
"remarks": "0",
"disclosedQuantity": "",
"orderTriggerPrice": "",
"validity": "DAY",
"bookProfitPrice": "",
"bookLossPrice": "",
"trailingPrice": "",
"amo": "",
"pricePrecision": "2",
"tickSize": "1",
"lotSize": "1",
"token": "14366",
"orderTime": "2025-09-18T09:21:44",
"exchangeUpdateTime": "",
"exchangeTime": "",
"orderSource": "1",
"isAck": false,
"leavesQuantity": "0"
}
],
"status": "success"
}
Order Status Types
| Status | Description | Next Action |
|---|---|---|
PENDING |
Order submitted, awaiting confirmation | Monitor for updates |
OPEN |
Order active in the market | Can modify or cancel |
COMPLETE |
Order fully executed | Review execution details |
CANCELLED |
Order cancelled by user/system | No further action |
REJECTED |
Order rejected by exchange | Check rejection reason |
Portfolio Views
Get Order Book
Access your complete order book for comprehensive order tracking.
Endpoint Details
Method: GET
URL: /user/orders
Authentication: Required (appID + token)
Request Example
Response Schema
{
"data": [
{
"status": "Ok",
"exchange": "NFO",
"symbol": "NIFTY16JAN25P23200",
"id": "25011400000974",
"orderStatus": "COMPLETE",
"quantity": "525",
"fillShares": "525",
"averagePrice": "92.89",
"transactionType": "S",
"tags": "fatafat",
"timeStamp": "10:44:54 14-01-2025"
}
],
"status": "success"
}
Get Trade Book
Review all executed trades for performance analysis and reconciliation.
Endpoint Details
Method: GET
URL: /user/trades
Authentication: Required (appID + token)
Response Schema
{
"data": [
{
"status": "Ok",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C49000",
"id": "24030700000195",
"quantity": "75",
"fillPrice": "57.60",
"fillQuantity": "60",
"transactionType": "S",
"fillTime": "07-03-2024 10:45:00",
"fillID": "431466313"
}
],
"status": "success"
}
Trading Strategy Examples
Market Buy Order
Immediate Purchase
Strategy: Buy RELIANCE shares immediately at market price
Order Type: Market Order
Risk: Price slippage possible
{
"exchange": "NSE",
"symbol": "RELIANCE-EQ",
"quantity": "10",
"transactionType": "B",
"order": "MKT",
"price": "0",
"product": "I",
"validity": "DAY"
}
Stop Loss Protection
Risk Management
Strategy: Sell TATASTEEL with stop-loss protection
Trigger: Sell if price hits ₹97
Limit: Maximum sell price ₹95
{
"exchange": "NSE",
"symbol": "TATASTEEL-EQ",
"quantity": "50",
"transactionType": "S",
"order": "SL-LMT",
"price": "95.0",
"triggerPrice": "97.0",
"product": "C",
"validity": "DAY"
}
Options Strategy
Options Trading
Strategy: Buy NIFTY call option
Premium: ₹50 per lot
Expiry: January 25, 2024
{
"exchange": "NFO",
"symbol": "NIFTY25JAN24C21000",
"quantity": "75",
"transactionType": "B",
"order": "LMT",
"price": "50.0",
"product": "M",
"validity": "DAY"
}
Error Handling
Standard HTTP status codes with detailed error responses:
Common Error Codes
- 400 Bad Request: Invalid order parameters or missing fields
- 401 Unauthorized: Invalid or expired authentication credentials
- 403 Forbidden: Insufficient trading permissions or account restrictions
- 409 Conflict: Order conflicts with existing positions or limits
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Exchange connectivity or system issues
Rate Limits
| Tier | Orders per minute | Modifications per minute | Queries per minute |
|---|---|---|---|
| Basic | 20 | 10 | 100 |
| Premium | 100 | 50 | 500 |
| Enterprise | 500 | 200 | 2000 |
Integration Guidelines
Best Practices
- Pre-flight Validation: Check margin requirements before placing orders
- Order Status Monitoring: Implement real-time order status tracking
- Error Recovery: Build robust error handling and retry mechanisms
- Rate Limit Management: Implement intelligent request throttling
- Idempotency: Use unique tags to prevent duplicate order submissions
Market Hours
Orders can be placed during market hours and as AMO (After Market Orders) for next-day execution. Always verify exchange-specific trading hours and holiday schedules.
Risk Considerations
- Always validate order parameters before submission
- Monitor position limits and margin requirements
- Implement proper stop-loss mechanisms for risk management
- Test thoroughly in paper trading environments before live deployment