Skip to content

Portfolio

This API lets you retrieve holdings and positions in your portfolio.

Base_URL: https://protrade.jainam.in/

Method API Detail
GET {{BASE_URL}}omt/api-order-rest/v1/holdings/productType Retrieve the list of long term equity holdings
GET {{BASE_URL}}omt/api-order-rest/v1/positions Retrieve the list of short term positions
POST {{BASE_URL}}omt/api-order-rest/v1/orders/positions/sqroff Closing an open position by offsetting it with an opposite trade.

Holdings

Holdings contain the long term equity Holdings of the customer. All the financial instruments in the holdings reside in the customer’s DEMAT account indefinitely until its sold or is delisted or changed by the exchanges. Changes to DEMAT account is settled in T+1 days.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "isin": "INE117A01022",
            "nseInstrumentId": "13",
            "bseInstrumentId": "500002",
            "nseTradingSymbol": "ABB-EQ",
            "bseTradingSymbol": "ABB",
            "previousDayClose": 0.0,
            "product": "LONGTERM",
            "formattedInstrumentName": "ABB",
            "averageTradedPrice": 0,
            "collateralQuantity": 0,
            "authorizedQuantity": 0,
            "dpQuantity": 0,
            "totalQuantity": 0,
            "t1Quantity": 0
        }
    ]
}

Response Parameters

Field Type Description
isin String International Securities Identification Number (ISIN) for the stock.
nseInstrumentId String Numeric identifier for the instrument on NSE (National Stock Exchange).
bseInstrumentId String Numeric identifier for the instrument on BSE (Bombay Stock Exchange).
nseTradingSymbol String Trading symbol/code used on NSE.
bseTradingSymbol String Trading symbol/code used on BSE.
previousDayClose Float Closing price of the instrument on the previous trading day.
product String Category/type of product (e.g., LONGTERM for long-term holdings).
formattedInstrumentName String Official full name of the instrument.
averageTradedPrice Float Average price at which the instrument was traded.
collateralQuantity Int Quantity of the instrument held as collateral.
authorizedQuantity Int Quantity authorized for trading or holding.
dpQuantity Int Quantity held in the Depository Participant account.
totalQuantity Int Total quantity of the instrument held.
t1Quantity Int Quantity still in the T+1 settlement period.

Positions

Users can retrieve a list of all open positions for the day. This includes all F&O carryforward positions as well.

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "instrumentId": "20776",
            "tradingSymbol": "BHAGYANGR-EQ",
            "formattedInstrumentName": "BHAGYANGR",
            "exchange": "NSE",
            "product": "LONGTERM",
            "netQuantity": 1,
            "netAveragePrice": 78.14,
            "overnightQuantity": 0,
            "overnightPrice": 0.00,
            "buyQuantity": 1,
            "sellQuantity": 0,
            "daySellQuantity": 0,
            "dayBuyQuantity": 1,
            "dayBuyPrice": 78.14,
            "daySellPrice": 0.00,
            "multiplier": 1,
            "lotsize": 1,
            "ticksize": 0.0,
            "previousDayClose": 78.33,
            "realizedPnl": 0,
            "buyPrice": 0,
            "sellPrice": 0,
            "dayBuyValue": 0,
            "daySellValue": 0,
            "validity": "DAY"
        },
        {
            "instrumentId": "20776",
            "tradingSymbol": "BHAGYANGR-EQ",
            "formattedInstrumentName": "BHAGYANGR",
            "exchange": "NSE",
            "product": "LONGTERM",
            "netQuantity": 1,
            "netAveragePrice": 78.14,
            "overnightQuantity": 0,
            "overnightPrice": 78.14,
            "buyQuantity": 1,
            "sellQuantity": 0,
            "daySellQuantity": 0,
            "dayBuyQuantity": 1,
            "dayBuyPrice": 78.14,
            "daySellPrice": 0.00,
            "multiplier": 1,
            "lotsize": 1,
            "ticksize": 0.0,
            "previousDayClose": 78.33,
            "realizedPnl": 0,
            "buyPrice": 0,
            "sellPrice": 0,
            "dayBuyValue": 0,
            "daySellValue": 0,
            "validity": "NET"
        }
     ]
 }

Response Parameters

Field Type Description
instrumentId String Unique identifier of the traded instrument.
tradingSymbol String Ticker symbol used for trading the instrument.
formattedInstrumentName String Readable name of the instrument.
exchange String Code representing the exchange where the trade is executed.
product String Product category of the trade (e.g., INTRADAY, LONGTERM, MTF).
netQuantity Int Total quantity currently held after netting buy and sell transactions.
netAveragePrice Float Weighted average price of the net position.
overnightQuantity Int Quantity carried forward from the previous trading day.
overnightPrice Int Average price of the overnight quantity.
buyQuantity Int Total quantity bought.
sellQuantity Int Total quantity sold.
daySellQuantity Int Quantity sold during the current trading day.
dayBuyQuantity Int Quantity bought during the current trading day.
dayBuyPrice Float Average price of the quantity bought during the day.
daySellPrice Float Average price of the quantity sold during the day.
multiplier Int Used to calculate the contract value (generally 1 for equities).
lotsize Int Minimum quantity allowed per order in the instrument.
ticksize Float Minimum allowed price movement (e.g., 0.01 means prices change by ₹0.01).
previousDayClose Float Last closing price of the instrument from the previous trading day.
realizedPnl Float Profit or loss made from closed (executed and exited) positions.
buyPrice Float Last traded buy price.
sellPrice Float Last traded sell price.
dayBuyValue Float Total value of buy trades executed during the day.
daySellValue Float Total value of sell trades executed during the day.

Position Square Off

Closing an open position by placing an opposite trade to realize profit or cut loss.

Request Structure

[
    {
        "exchange": "NSE",
       "instrumentId": "14366",
        "transactionType": "BUY",
        "quantity": 10,
        "product": "LONGTERM",
        "orderComplexity": "REGULAR",
        "orderType": "LIMIT",
        "price": "6.3",
        "validity": "DAY",
        "slTriggerPrice": "",
        "trailingSlAmount": "",
        "apiOrderSource": "",
        "algoId": "",
        "marketProtectionPercent": "",
        "disclosedQuantity":"",
        "orderTag":""
    }
]

Input parameters

Field Type Description
instrumentId String Unique identifier assigned to the specific instrument being traded.
exchange String Code representing the exchange where the trade is executed.
transactionType String Type of transaction, indicating whether the trade is a "BUY" or "SELL".
quantity Int Quantity of the instrument to be traded.
orderComplexity String Complexity level of the order (e.g., REGULAR, AMO).
product String Product category of the trade (e.g., INTRADAY, LONGTERM, MTF).
orderType String Price type: Limit, Market, SL, SLM.
validity String Validity period of the order (e.g., DAY, IOC).
price String Price specified for the trade; may be ignored for market orders.
slTriggerPrice String Trigger price for stop-loss orders.
trailingSlAmount String Amount by which the stop-loss will trail the market price.
disclosedQuantity Int Portion of the total quantity disclosed to the market.
marketProtectionPercent String Allowed percentage deviation from the market price to protect from slippage.
apiOrderSource String Source identifier for API-based orders.
algoId String Identifier for the algorithm placing the order.
orderTag String Custom tag to identify or group orders (user-defined).

Response Structure

{
    "status": "Ok",
    "message": "Success",
    "result": [
        {
            "requestTime": "17:21:21 26-05-2025",
            "brokerOrderId": "250526000002697"
        }
    ]
}

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.