Orders¶
Note
The BASE URL, Endpoint, and Payload JSON key values are case-sensitive. Please use the format which we have given in the documentation.
| Type | APIs | Details |
|---|---|---|
| POST | {{BASE_URL}}/open-api/od/v1/orders/placeorder | Place Order submits a buy or sell request for a specific asset. |
| GET | {{BASE_URL}}/open-api/od/v1/orders/book | An Order Book is a real-time record of all buy and sell orders. |
| POST | {{BASE_URL}}/open-api/od/v1/orders/history | Order History is a record of all past buy and sell orders made by a user. |
| POST | {{BASE_URL}}/open-api/od/v1/orders/modify | Modify orders means changing an existing order’s price, quantity, or type. |
| POST | {{BASE_URL}}/open-api/od/v1/orders/cancel | Cancel orders means to revoke or delete a placed order before execution. |
| GET | {{BASE_URL}}/open-api/od/v1/orders/trades | TradeBook records all executed trades with details like price, quantity, and time. |
| POST | {{BASE_URL}}/open-api/od/v1/orders/checkMargin | Single Order Margin provides margin details required for placing a specific order. |
| POST | {{BASE_URL}}/open-api/od/v1/orders/exit/sno | Exit bracket order. |
Place Order¶
Request Structure
[
{
"exchange": "nse",
"instrumentId": "1594",
"transactionType": "buy",
"quantity": 1,
"product": "LONGTERM",
"orderComplexity": "regular",
"orderType": "limit",
"price": "1585.60",
"validity": "day",
"slTriggerPrice": "",
"disclosedQuantity": "",
"marketProtectionPercent": "",
"targetLegPrice": "",
"slLegPrice": "",
"trailingSlAmount": "",
"apiOrderSource": "",
"algoId": "",
"orderTag": "test nse market"
}
]
Input parameters
| Field | Type | Description |
|---|---|---|
| exchange | String | Exchange where the order is to be placed (e.g., NSE, BSE). |
| instrumentId | String | Unique identifier or scrip/token ID of the instrument. |
| transactionType | String | Type of transaction: Buy or Sell. |
| quantity | Int | Total quantity to be ordered. |
| product | String | Product type (e.g., INTRADAY, LONGTERM). |
| orderComplexity | String | Order type: REGULAR, AMO, BO. |
| orderType | String | Pricing type: LIMIT, MARKET, SL, SLM. |
| price | Float | Limit price set for the order. |
| validity | String | Order validity: DAY, IOC. |
| slTriggerPrice | Float | Stop Loss trigger price (optional, used in SL/SLM orders). |
| marketProtectionPercent | Float | Price deviation limit for market protection (if applicable). |
| targetLegPrice | Float | Target price used in bracket orders (optional). |
| slLegPrice | Float | Stop Loss leg price (used in bracket/SL orders). |
| trailingSlAmount | Float | Amount for trailing Stop Loss (if used). |
| apiOrderSource | String | Source of the order (e.g., API, WEB, APP). |
| algoId | String | Identifier for algorithm placing the order (if applicable). |
| orderTag | String | Custom tag or note for tracking purposes. |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"brokerOrderId": "25082200000084",
"requestTime": "14:30:18 22-08-2025"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| requestTime | String | when the API request was initiated by the client, used for logging, tracking, or validating request timing. |
| brokerOrderId | String | Broker orderId is defined as Unique number it can be generated while placing the order. |
Order Book¶
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"clientId": "I10230",
"placedBy": "I10230",
"brokerOrderId": "250717000021438",
"exchange": "NSE",
"exchangeOrderId": "",
"formattedInstrumentName": "INFY-EQ",
"tradingSymbol": "INFY-EQ",
"instrumentId": "1594",
"transactionType": "BUY",
"quantity": 1,
"product": "LONGTERM",
"orderComplexity": "REGULAR",
"orderType": "LIMIT",
"price": 1585.60,
"averageTradedPrice": 0.00,
"slTriggerPrice": 0.00,
"validity": "DAY",
"disclosedQuantity": 0,
"orderTime": "2025-07-17 16:26:27",
"exchangeUpdateTime": "",
"rejectionReason": "RMS:Margin Exceeds,Required:1585.60, Available:0.01 for entity account-I10230 across exchange across segment across product ",
"mainLegOrderId": "",
"cancelledQuantity": 0,
"pendingQuantity": 0,
"filledQuantity": 0,
"appKey": "",
"algoId": "",
"source": "API",
"orderTag": "test nse market",
"trailingSlAmount": 0,
"brokerUpdateTime": "",
"marketProtectionPercent": "",
"exchangeTimestamp": "",
"orderStatus": "REJECTED"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| clientId | String | UCC client ID. |
| placedBy | String | Dealer/Client code who placed the order. |
| brokerOrderId | String | Unique ID assigned to the order by the broker. |
| exchange | String | Exchange and segment (e.g., NSE,BSE). |
| exchangeOrderId | String | Unique ID assigned to the order by the exchange. |
| formattedInstrumentName | String | Full name of the instrument. |
| tradingSymbol | String | Trading symbol of the instrument. |
| instrumentId | String | Unique identifier or scrip code of the instrument. |
| transactionType | String | Type of transaction:Buy or Sell. |
| quantity | Int | Total quantity for the order. |
| product | String | Product type (e.g., INTRADAY, LONGTERM). |
| orderComplexity | String | Type of order: REGULAR, AMO, etc. |
| orderType | String | Order pricing type: LIMIT, MARKET, SL, SLM. |
| price | Float | Limit price entered by the client. |
| averageTradedPrice | Float | Weighted average price of matched trades. |
| slTriggerPrice | Float | Stop Loss trigger price. |
| validity | String | Order validity duration (e.g., DAY, IOC). |
| disclosedQuantity | Int | Quantity to be disclosed in market feed. |
| orderTime | DateTime | Date and time when the order was initially placed on the exchange or by the client. |
| exchangeUpdateTime | DateTime | Time when the latest update for this order came from exchange. |
| rejectionReason | String | Reason for order rejection. |
| mainLegOrderId | String | Identifier for the main/parent order in a bracket order. |
| cancelledQuantity | Int | Quantity of the order that was cancelled. |
| pendingQuantity | Int | Quantity of the order still pending. |
| filledQuantity | Int | Quantity of the order that has been filled. |
| appKey | String | App key of the client/vendor/franchise that placed the order. |
| algoId | String | Identifier for the algorithm placing the order. |
| source | String | Origin of the order (Web, App, API, etc.). |
| orderTag | String | User-defined tag for internal tracking. |
| trailingSLAmount | Int | Amount by which SL price trails the market. |
| brokerUpdateTime | DateTime | Timestamp when the broker last updated the order. |
| marketProtectionPercent | String | Price deviation limit for market protection. |
| exchangeTimestamp | DateTime | Timestamp when the order was placed. |
| orderStatus | String | Current status of the order (e.g., rejected, open, complete). |
Order History¶
Request Structure
Input Parameters
| Field | Type | Description |
|---|---|---|
| brokerOrderId | String | Unique ID assigned to the order by the broker. |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"clientId": "I10230",
"placedBy": "I10230",
"brokerOrderId": "250721000016466",
"exchange": "NSE",
"exchangeOrderId": "1594",
"formattedInstrumentName": "INFY-EQ",
"tradingSymbol": "INFY-EQ",
"instrumentId": "",
"transactionType": "BUY",
"quantity": 1,
"product": "LONGTERM",
"orderComplexity": "REGULAR",
"orderType": "LIMIT",
"price": 1585.60,
"averageTradedPrice": 0.00,
"slTriggerPrice": 0.00,
"validity": "DAY",
"disclosedQuantity": 0,
"orderTime": "2025-07-21 14:20:07",
"exchangeUpdateTime": "2025-07-21 14:20:07",
"rejectionReason": "RMS:Margin Exceeds,Required:1585.60, Available:0.01 for entity account-DLK9892 across exchange across segment across product ",
"mainLegOrderId": "",
"cancelledQuantity": 0,
"pendingQuantity": 0,
"filledQuantity": 0,
"appKey": "",
"algoId": "",
"source": "API",
"orderTag": "",
"trailingSlAmount": 0,
"brokerUpdateTime": "",
"marketProtectionPercent": null,
"exchangeTimestamp": "--",
"orderStatus": "rejected"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| clientId | String | UCC client ID. |
| placedBy | String | Dealer/Client code who placed the order. |
| brokerOrderId | String | Unique ID assigned to the order by the broker. |
| exchange | String | Exchange and segment (e.g., NSE,BSE). |
| exchangeOrderId | String | Unique ID assigned to the order by the exchange. |
| formattedInstrumentName | String | Full name of the instrument. |
| tradingSymbol | String | Trading symbol of the instrument. |
| instrumentId | String | Unique identifier or scrip code of the instrument. |
| transactionType | String | Type of transaction:Buy or Sell. |
| quantity | Int | Total quantity for the order. |
| product | String | Product type (e.g., INTRADAY, LONGTERM). |
| orderComplexity | String | Type of order: REGULAR, AMO, etc. |
| orderType | String | Order pricing type: LIMIT, MARKET, SL, SLM. |
| price | Float | Limit price entered by the client. |
| averageTradedPrice | Float | Weighted average price of matched trades. |
| slTriggerPrice | Float | Stop Loss trigger price. |
| validity | String | Order validity duration (e.g., DAY, IOC). |
| disclosedQuantity | Int | Quantity to be disclosed in market feed. |
| orderTime | DateTime | Date and time when the order was initially placed on the exchange or by the client. |
| exchangeUpdateTime | DateTime | Time when the latest update for this order came from exchange. |
| rejectionReason | String | Reason for order rejection. |
| mainLegOrderId | String | Identifier for the main/parent order in a bracket order. |
| cancelledQuantity | Int | Quantity of the order that was cancelled. |
| pendingQuantity | Int | Quantity of the order still pending. |
| filledQuantity | Int | Quantity of the order that has been filled. |
| appKey | String | App key of the client/vendor/franchise that placed the order. |
| algoId | String | Identifier for the algorithm placing the order. |
| source | String | Origin of the order (Web, App, API, etc.). |
| orderTag | String | User-defined tag for internal tracking. |
| trailingSLAmount | Int | Amount by which SL price trails the market. |
| brokerUpdateTime | DateTime | Timestamp when the broker last updated the order. |
| marketProtectionPercent | String | Price deviation limit for market protection. |
| exchangeTimestamp | DateTime | Timestamp when the order was placed. |
| orderStatus | String | Current status of the order (e.g., rejected, open, complete). |
Modify Order¶
Request Structure
{
"brokerOrderId":"250526000002881"
"quantity": 20,
"orderType": "limit",
"price": "6.5",
"slLegPrice": "",
"trailingSLAmount": "",
"targetLegPrice": "",
"validity":"",
"disclosedQuantity": "",
"marketProtectionPercent": "",
"trailingSLAmount": ""
}
Input parameters
| Field | Type | Criticality | Description |
|---|---|---|---|
| brokerOrderId | String | Required | Unique ID assigned to the order by the broker. |
| quantity | Int | Optional | Quantity of the instrument specified in the order. |
| orderType | String | Optional | Order pricing type: LIMIT, MARKET, SL, SLM. |
| price | String | Conditionally Required | Price at which the order is intended to execute, if applicable. |
| slTriggerPrice | String | Conditionally Required | Price at which a conditional order triggers, used for stop orders. |
| targetLegPrice | Float | Target price used in bracket orders (optional). | |
| slLegPrice | Float | Stop Loss leg price (used in bracket/SL orders). | |
| validity | String | Optional | Order validity duration (e.g., DAY, IOC). |
| disclosedQuantity | String | Optional | Quantity disclosed to the market for transparency, if different from the full quantity. |
| marketProtectionPercent | String | Optional | Market protection setting to reduce impact on price movement; may be blank if unused. |
| trailingSLAmount | String | Optional | Amount by which SL price trails the market. |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"brokerOrderId": "250722000011265",
"requestTime": "22-Jul-2025 11:50:17"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| requestTime | String | when the API request was initiated by the client, used for logging, tracking, or validating request timing. |
| brokerOrderId | String | Order Number is defined as Unique number it can be generated while placing the order. |
Cancel Order¶
Request Structure
Input Parameters| Field | Type | Description |
|---|---|---|
| brokerOrderId | String | Unique ID assigned to the order by the broker. |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"brokerOrderId": "250721000016466",
"requestTime": "21-Jul-2025 14:47:46"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| requestTime | String | when the API request was initiated by the client, used for logging, tracking, or validating request timing. |
| brokerOrderId | String | Order Number is defined as Unique number it can be generated while placing the order. |
Trade Book¶
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"clientId": "I10230",
"placedBy": "I10230",
"brokerOrderId": "250722000010993",
"exchangeOrderId": "1100000033583948",
"exchangeTradeId": "203825582",
"formattedInstrumentName": "IDEA-EQ",
"tradingSymbol": "IDEA-EQ",
"instrumentId": "14366",
"exchange": "NSE",
"transactionType": "BUY",
"product": "LONGTERM",
"orderComplexity": "REGULAR",
"orderType": "MARKET",
"validity": "DAY",
"tradedPrice": 7.48,
"filledQuantity": 1,
"orderTime": "2025-07-22 11:40:18",
"fillTimestamp": "2025-07-22 11:40:33",
"orderTag": "--",
"algoId": ""
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| clientId | String | UCC client ID. |
| placedBy | String | Dealer/Client code who placed the order. |
| brokerOrderId | String | Unique ID assigned to the order by the broker. |
| exchangeOrderId | String | Unique ID assigned to the order by the exchange. |
| exchangeTradeId | String | A unique identifier assigned by the exchange to each executed trade |
| formattedInstrumentName | String | Full name of the instrument. |
| tradingSymbol | String | Trading symbol of the instrument. |
| instrumentId | String | Unique identifier or scrip code of the instrument. |
| exchange | String | Exchange and segment (e.g., NSE,BSE). |
| transactionType | String | Type of transaction:Buy or Sell. |
| product | String | Product type (e.g., INTRADAY, LONGTERM). |
| orderComplexity | String | Type of order: REGULAR, AMO, etc. |
| orderType | String | Order pricing type: LIMIT, MARKET, SL, SLM. |
| validity | String | Order validity duration (e.g., DAY, IOC). |
| tradedPrice | Number | Weighted average price of matched trades. |
| filledQuantity | Number | Quantity of the order that has been filled. |
| orderTime | DateTime | Date and time when the order was initially placed on the exchange or by the client. |
| fillTimestamp | DateTime | The exact date and time when the order was executed (filled) on the exchange. |
| algoId | String | Identifier for the algorithm placing the order. |
| orderTag | String | User-defined tag for internal tracking. |
Order Margin¶
Request Structure
{
"exchange": "bse",
"instrumentId": "532822",
"transactionType": "BUY",
"quantity": "20",
"product": "LONGTERM",
"orderComplexity": "Regular",
"orderType": "market",
"price": "0.5",
"validity": " day",
"slLegPrice": "0",
"slTriggerPrice": "0",
"targetLegPrice": ""
}
Input parameters
| Field | Type | Description |
|---|---|---|
| exchange | String | Exchange where the order will be placed (e.g., NSE, BSE). |
| instrumentId | String | Unique identifier or scrip code of the instrument (e.g., 532822 for BSE). |
| transactionType | String | Type of transaction: Buy or Sell. |
| quantity | Int | Total quantity for the order. |
| product | String | Product type (e.g., INTRADAY, LONGTERM). |
| orderComplexity | String | Type of order: REGULAR, AMO, etc. |
| orderType | String | Order pricing type: LIMIT, MARKET, SL, SLM. |
| price | Float | Limit price entered by the client. Optional for MARKET order. |
| validity | String | Order validity: DAY, IOC. |
| slTriggerPrice | Float | Stop Loss trigger price (optional, used in SL/SLM orders). |
| targetLegPrice | Float | Target price used in bracket orders (optional). |
| slLegPrice | Float | Stop Loss leg price (used in bracket/SL orders). |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"status": "Ok",
"message": "Success",
"totalCashAvailable": "0",
"preOrderMargin": "",
"postOrderMargin": "10.00",
"currentOrderMargin": "10.00",
"rmsValidationCheck": "",
"fundShort": ""
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| totalCashAvailable | String | The total cash amount available in the trading account. |
| preOrderMargin | String | Margin utilized before placing the current order. |
| postOrderMargin | String | Margin amount required or reserved after placing the current order. |
| currentOrderMargin | String | Margin needed specifically for the current order. |
| rmsValidationCheck | String | Result or status of the Risk Management System validation (empty if no issues). |
| fundShort | String | Indicates any shortfall in funds required for the order. |
Exit Bracket Order¶
Request Structure
Input parameters
| Field | Type | Description |
|---|---|---|
| brokerOrderId | String | Broker orderId is defined as Unique number it can be generated while placing the order. |
| orderComplexity | String | Type of order: REGULAR, AMO, etc. |
Response Structure
{
"status": "Ok",
"message": "Success",
"result": [
{
"brokerOrderId": "250526000002881",
"requestTime": "26-May-2025 13:11:34"
}
]
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| requestTime | String | when the API request was initiated by the client, used for logging, tracking, or validating request timing. |
| brokerOrderId | String | Order Number is defined as Unique number it can be generated while placing the order. |