Skip to content

Orders

The order management API lets you place a new order, cancel or modify the pending order, retrieve the order status, trade status, order book & tradebook.

Type API Details
POST api/od-rest/orders/execute Place a new order
POST api/od-rest/orders/modify Modify a pending order
POST api/od-rest/orders/cancel Cancel a pending order
POST api/od-rest/orders/getmargin Get order margin
GET api/od-rest/info/orderbook Retrieve the list of all orders for the day
GET api/od-rest/info/tradebook Retrieve the list of all trades for the day
POST api/od-rest/info/history Get order history

Place Order

Request Structure

[
    {
        "exchange": "NSE",
        "tradingSymbol": "EURINR15SEP23F",
        "qty": "1",
        "price": "1",
        "product": "MIS",
        "transType": "BUY",
        "priceType": "MKT",
        "triggerPrice": 0,
        "ret": "DAY",
        "disclosedQty": 0,
        "mktProtection": "",
        "target": 1,
        "stopLoss": 1,
        "orderType": "AMO",
        "token": "25"
    }
]

Input parameters

Field Type Description
exchange String Code representing the exchange where the trade is executed
tradingSymbol String The symbol representing the stock or asset being traded.
qty String Quantity of the instrument to be traded.
price String Price specified for the trade; for market orders, it may be set to a placeholder.
product String Product category of the trade.
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
priceType String Price type(L or MKT or SL or SL-M)
triggerPrice Number Price at which a conditional order activates; relevant for stop orders.
ret String Validity period of the order, specifying how long it remains active.
disclosedQty Number Portion of the quantity revealed to the market; used in large trades for transparency.
mktProtection String Protection setting to limit adverse market impacts; may be left blank if not applicable.
target Number Target price for the order; the order aims to achieve this price if possible.
stopLoss Number Stop-loss threshold to limit losses on the trade.
orderType String Type of order
token String Unique identifier assigned to the specific instrument being traded.

Response Structure

[
    {
        "status": "Ok",
        "message": "Success",
        "infoMessage": null,
        "result": [
            {
                "requestTime": "",
                "orderNo": "AFBJQ00005;"
            }
        ]
    }
]

Parameters

Field Type Description
requestTime String Order specific identification generated by Jainam
orderNo String Order Number is defined as Unique number it can be generated while placing the order

Modify Order

Request Structure

{
    "exchange": "BSE",
    "tradingSymbol": "ATFL",
    "orderNo": "OKCIH0000BD3",
    "qty": "20",
    "ret": "DAY",
    "priceType": "MKT",
    "transType": "BUY",
    "price": "200",
    "triggerPrice": "",
    "disclosedQty": "0",
    "mktProtection": "",
    "target": "0",
    "stopLoss": "0",
    "tradedQty": "0",
    "filledQty": "0",
    "product": "MIS",
    "orderType": "AMO",
    "token": "500215"
}

Input parameters

Field Type Description
exchange String Code representing the exchange where the trade is executed
tradingSymbol String Trading symbol of the stock.
orderNo String Unique identifier for the order assigned by the system.
qty String Quantity of the instrument specified in the order.
ret String Validity period of the order, specifying how long it remains active.
priceType String Price type(L or MKT or SL or SL-M)
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
price String Price at which the order is intended to execute, if applicable.
triggerPrice String Price at which a conditional order triggers, used for stop orders.
disclosedQty String Quantity disclosed to the market for transparency, if different from the full quantity.
mktProtection String Market protection setting to reduce impact on price movement; may be blank if unused.
target String Target price set for the order, indicating a desired price level.
stopLoss String Stop-loss threshold, specifying a price to minimize potential losses.
tradedQty String Quantity that has already been traded from the order.
filledQty String Quantity filled or executed so far in the order.
product String Product category of the trade.
orderType String Type of order
token String Unique token identifier assigned to the instrument being traded.

Response Structure

[
    {
        "status": "Ok",
        "message": "Success",
        "infoMessage": null,
        "result": [
            {
                "requestTime": "",
                "orderNo": "AFBJQ00013"
            }
        ]
    }
]

Parameters

Field Type Description
requestTime String Order specific identification generated by Jainam
orderNo String Order Number is defined as Unique number it can be generated while placing the order

Cancel Order

Request Structure

    {
        "exchange": "BSE",
        "orderNo": "AFDOB00009@2",
        "orderType": "DELIVERY"
    }

Input parameters

Field Type Description
exchange String Code representing the exchange where the trade is executed
orderNo String Order Number is defined as Unique number it can be generated while placing the order
orderType String Type of order

Response Structure

[
    {
        "status": "Ok",
        "message": "Success",
        "result": [
            {
                "requestTime": "",
                "orderNo": "AFBJQ00013"
            }
        ]
    }
]

Parameters

Field Type Description
requestTime String Order specific identification generated by Jainam
orderNo String Order Number is defined as Unique number it can be generated while placing the order

Order Margin

Request Structure

{
  "orderFlag": "NEW",
  "transType": "B",
  "exchange": "NSE",
  "token": "11915",
  "qty": "2",
  "price": "18.35",
  "tradingSymbol": "YESBANK-EQ",
  "product": "MIS",
  "priceType": "L",
  "triggerPrice": "0",
  "orderType": "Regular",
  "stopLoss": "0",
  "openOrderQty": "2"
}

Input parameters

Field Type Description
orderFlag String Status of the order .
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
exchange String Code representing the exchange where the trade is executed
token String Token number of the stock.
qty String Quantity of stock ordered.
price String Price at which the order was placed.
tradingSymbol String Trading symbol of the stock.
product String Product category of the trade.
priceType String Price type(L or MKT or SL or SL-M)
triggerPrice String Trigger price .
orderType String Type of order
stopLoss String Stop-loss price.
openOrderQty String Quantity of open (pending) orders.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "infoMessage": null,
    "result": [
        {
            "requiredMargin": "903.10",
            "availableMargin": "-2.26",
            "brokerage": "2.26",
            "marginShortfall": "905.36"
        }
    ]
}

Parameters

Field Type Description
requiredMargin String After the order is executed, the necessary balance is called and displayed.
availableMargin String Available Margin represents the total amount of funds that can be utilized for trading
brokerage String Brokerage is the fee that an investor or trader must pay to a brokerage in exchange for its services
marginShortfall String The margin shortfall is the difference between the required margin and the available margin in the form of funds or collateral

Order Book

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "infoMessage": null,
    "result": [
        {
            "orderNo": "OKCIH0000BD3",
            "userId": "WA5099",
            "actId": "WA5099",
            "exchange": "BSE",
            "companyName": "AGRO TECH FOODS LTD.",
            "tradingSymbol": "ATFL",
            "qty": "2",
            "transType": "BUY",
            "ret": "EOSESS",
            "token": "500215",
            "multiplier": null,
            "lotSize": "1",
            "tickSize": null,
            "price": "200.00",
            "avgTradePrice": null,
            "disclosedQty": "0",
            "product": "MIS",
            "priceType": "MKT",
            "orderType": "AMO",
            "orderStatus": "OMS Sent",
            "fillShares": "0",
            "exchUpdateTime": "2025-03-20 10:41:30",
            "exchOrderId": "0",
            "formattedInsName": "ATFL",
            "ltp": null,
            "rejectedReason": " Price / Trigger Price is out of DPR range 654.95:982.35 WA5099",
            "triggerPrice": "0.00",
            "mktProtection": null,
            "target": null,
            "stopLoss": null,
            "trailingPrice": null,
            "orderTime": "2025-03-20 10:41:30",
            "orderStatusDescription": "The order has been transmitted by the Order Management System (OMS), which manages the order flow and execution process.",
            "rprice": null,
            "rqty": null
        }
]
}

Parameters

Field Type Description
status String Status of the response.
message String Message providing more information.
infoMessage String Additional info message, if any (can be null).
result Array Contains the details of the order.
orderNo String Unique order number.
userId String User ID associated with the order.
actId String Account ID linked to the order.
exchange String Code representing the exchange where the trade is executed
companyName String Name of the company being traded.
tradingSymbol String Trading symbol of the stock.
qty String Quantity of stock ordered.
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
ret String Validity period of the order, specifying how long it remains active.
token String Token number of the stock.
multiplier String Multiplier value (can be null).
lotSize String Lot size of the stock.
tickSize String Tick size (can be null).
price String Price at which the order was placed.
avgTradePrice String Average trade price (null if not executed).
disclosedQty String Disclosed quantity (if any).
product String Product category of the trade.
priceType String Price type(L or MKT or SL or SL-M)
orderType String Type of order
orderStatus String Current status of the order.
fillShares String Number of shares filled (executed).
exchUpdateTime String Time when the exchange updated the order.
exchOrderId String Exchange order ID .
formattedInsName String Formatted instrument name.
ltp String Last traded price .
rejectedReason String Reason for order rejection .
triggerPrice String Trigger price .
mktProtection String Market protection value (if any).
target String Target price (if set).
stopLoss String Stop-loss price (if set).
trailingPrice String Trailing price (if set).
orderTime String Time when the order was placed.
orderStatusDescription String Detailed description of the order status.
rprice String Reserved price (if any).
rqty String Reserved quantity (if any).

Trade Book

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "infoMessage": null,
    "result": [
        {
            "orderNo": "NWSYF00001J4",
            "userId":"<USER_ID>",
            "actId": "<ACT_ID>",
            "exchange": "NSE_EQ",
            "ret": null,
            "product": "",
            "orderType": "Regular",
            "priceType": "",
            "fillId": null,
            "fillTime": null,
            "transType": "BUY",
            "tradingSymbol": "NIFTY",
            "qty": null,
            "token": "15124",
            "fillshares": null,
            "fillqty": null,
            "pricePrecision": null,
            "lotSize": null,
            "tickSize": null,
            "price": null,
            "prcftr": null,
            "fillprc": null,
            "exchUpdateTime": null,
            "exchOrderId": "66545",
            "formattedInsName": null,
            "ltp": null,
            "orderTime": "2023-04-26 15:59:50"
            "companyName": "NIFTY"
        }
    ]
}

Parameters

Field Type Description
orderNo String Unique identifier generated when placing the order.
userId String The identifier for the user who placed the order.
actId String ID of the logged-in user.
exchange String Code representing the exchange where the trade is executed
ret String Validity period of the order, specifying how long it remains active.
product String Product category of the trade.
orderType String Type of order
priceType String Price type(L or MKT or SL or SL-M)
fillId String ID associated with the filled order.
fillTime String Time when the order was filled or executed.
tranType String Type of transaction (e.g., Buy, Sell).
tradingSymbol String The symbol representing the stock or asset being traded.
KOLTEPATIL String Trading symbol KOLTEPATIL
qty String The quantity of shares or units being traded.
token String Unique code for companies listed on the exchange. It identifies the company's instrument.
fillshares String Number of shares that have been filled or executed.
fillqty String Quantity of the instrument that has been filled or executed. This represents the actual number of shares or units transacted.
pricePrecision String The number of decimal places or digits that the price of an instrument is rounded to on the exchange.
lotSize String The number of units in one lot of the trading instrument.
tickSize String The minimum price movement of the trading instrument.
price String Price at which the main leg of the bracket order will be placed.
fillprc String Price at which the order was filled or executed.
exchUpdateTime String Time when the order status was last updated on the exchange.
exchOrderId String Order ID assigned by the exchange.
formattedInsName String Formatted name or identifier of the instrument.
ltp String Last Traded Price; the most recent price at which the security was traded.
OrderTime String Time when the order was placed or initiated.
companyName String Name of the company being traded.

Order History

Request Structure

{
   "orderNo": "23060600006062"
}

Input parameters

Field Type Description
orderNo String Order Number is defined as Unique number it can be generated while placing the order

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "infoMessage": null,
    "result": [
         {
            "orderNo": "OKCIH0000BD3",
            "userId": "<USER_ID>",
            "actId": "",
            "exchange": "BSE",
            "tradingSymbol": "ATFL",
            "quantity": "2",
            "transType": "BUY",
            "priceType": "",
            "orderType": "RL-MKT",
            "ret": "",
            "token": "",
            "pricePrecision": "",
            "lotSize": "",
            "tickSize": "",
            "price": "200.00",
            "avgPrice": "",
            "disclosedQty": "",
            "product": "INTRADAY",
            "status": "OMSXMITTED",
            "report": "",
            "fillshares": "2",
            "time": "2025-03-20 10:41:30",
            "exchTime": "2025-03-20 10:41:30",
            "remarks": "",
            "exchOrderNo": "0",
            "companyName": "AGRO TECH FOODS LTD."
        },
    ]
}

Parameters

Field Type Description
Status String Current status of the order (e.g., Executed, Pending, Cancelled).
infoMessage String Additional info message, if any (can be null).
message String Any messages or alerts related to the order.
orderNo String Unique order number.
userId String User ID associated with the order.
actId String Account ID linked to the order.
exchange String Code representing the exchange where the trade is executed
tradingSymbol String Trading symbol of the stock.
quantity String Quantity of stock ordered.
transType String Type of transaction, indicating whether the trade is a "BUY" or "SELL"
priceType String Price type(L or MKT or SL or SL-M)
orderType String Type of order
ret String Validity period of the order, specifying how long it remains active.
token String Token number of the stock.
pricePrecision String Price precision value (if any).
lotSize String Lot size of the stock.
tickSize String Tick size (if any).
price String Price at which the order was placed.
avgPrice String Average price at which shares were traded.
disclosedQty String Disclosed quantity (if any).
product String Product category of the trade.
status String Current status of the order (e.g., OMSXMITTED).
report String Report details (if any).
fillshares String Number of shares filled (executed).
time String Time when the order was placed.
exchTime String Time when the exchange updated the order.
remarks String Additional remarks or comments.
exchOrderNo String Exchange order number (if assigned).
companyName String Name of the company being traded.