Portfolio

A portfolio is a collection of financial investments like stocks, commodities, bonds, cash, long-term equity holdings and short-term positions. The portfolio APIs return instruments in a portfolio with updated profit and loss computations.

MethodAPIsEndpointDescription
GETHolding/portfolio/holdingsTo retrieve holding
GETPosition/portfolio/positionsTo retrieve position
PUTPosition conversion/portfolio/position-conversionTo convert position

Holding API

Holdings exist with the user's portfolio of long term equity delivery stocks. An instrument in a holdings portfolio remains there indefinitely until its sold or is delisted or changed by the exchanges. Underneath it all, instruments in the holdings reside in the user's DEMAT account, as settled by exchanges and clearing institutions.

Sample Response:
{
  "status": "success",
  "data": [
    {
      "symbol": "ACC",
      "token": "22",
      "isin_code": "INE012A01025",
      "quantity": "0",
      "utilized_quantity": "0",
      "remaining_quantity": "0",
      "last_trade_price": "1735.80",
      "average_price": "2287.78",
      "collateral": "NA",
      "collateral_quantity": "NA",
      "market_value": "0.00",
      "exchange": "NSE"
    }
  ]
}

Position API

Two sets of positions are returned by Position api, net and day. Net is the actual, current net position portfolio, while day is a snapshot of the buying and selling activity for that particular day.

Sample Response
{
  "status": "success",
  "data": [
    {
      "token": "14366",
      "inst_type": "EQUITIES",
      "exchange": "NSE",
      "expiry_date": "NA",
      "strike_price": "NA",
      "option_type": "NA",
      "buy_quantity": "1",
      "buy_value": "8.25",
      "buy_average_price": "8.25",
      "sell_quantity": "0",
      "sell_value": "0.00",
      "sell_average_price": "0.00",
      "net_quantity": "1",
      "net_value": "-8.25",
      "net_average_price": "8.25",
      "product_type": "DELIVERY",
      "regular_lot": "1",
      "last_trade_price": "",
      "mark_to_market": "",
      "cf_buy_value": "0",
      "cf_sell_value": "0"
    }
  ]
}

Position-conversion API

Every position contains one margin product. These products affect how the user's margin usage and free cash values are computed, and a user may wish to convert or change a position's margin product on timely basis.

Sample Request(Body):

{
  "action": "BUY",
  "exchange": "NSE",
  "token": "11536",
  "product_type": "DELIVERY",
  "new_product_type": "INTRADAY",
  "quantity": "1"
}

Sample Response:

{
  "status": "success"
}