Groww LogoGroww API

Portfolio

This guide describes how to get detailed information about your holdings and positions using our Python SDK.

Get Holdings

Use the get_holdings_for_user method to fetch your current holdings quickly and see all your stocks in one place.

Holdings represent the user's collection of long-term equity delivery stocks. An asset in a holdings portfolio stays there indefinitely unless it is sold, delisted, or modified by the exchanges. Fundamentally, the assets in the holdings are stored in the user's DEMAT account, as processed by exchanges and clearing institutions.

Python SDK Usage

from growwapi import GrowwAPI
 
# Groww API Credentials (Replace with your actual credentials)
API_AUTH_TOKEN = "your_token"
 
# Initialize Groww API
groww = GrowwAPI(API_AUTH_TOKEN)
 
# Optional: timeout parameter (in seconds) for the API call; default is typically set by the SDK.
holdings_response = groww.get_holdings_for_user(timeout=5)
print(holdings_response)

Response Payload

All prices in rupees

"holdings": [
  {
    "isin": "INE545U01014",
    "trading_symbol": "RELIANCE",
    "quantity": 10,
    "average_price": 100,
    "pledge_quantity": 2,
    "demat_locked_quantity": 1,
    "groww_locked_quantity": 1.5,
    "repledge_quantity": 0.5,
    "t1_quantity": 3,
    "demat_free_quantity": 5,
    "corporate_action_additional_quantity": 1,
    "active_demat_transfer_quantity": 1
  }
]

Response Schema

NameTypeDescription
isinstringThe ISIN (International Securities Identification number) of the symbol
trading_symbolstringThe trading symbol of the holding
quantityfloatThe net quantity of the holding
average_priceintThe average price of the holding
pledge_quantityfloatThe pledged quantity of the holding
demat_locked_quantityfloatThe demat locked quantity of the holding
groww_locked_quantityfloatThe Groww locked quantity of the holding
repledge_quantityfloatThe repledged quantity of the holding
t1_quantityfloatThe T1 quantity of the holding
demat_free_quantityfloatThe demat free quantity of the holding
corporate_action_additional_quantityintThe corporate action additional quantity of the holding
active_demat_transfer_quantityintThe active demat transfer quantity of the holding

Get Positions for User

Fetch all positions associated with your account using this get_positions_for_user method.

Python SDK Usage

from growwapi import GrowwAPI
 
# Groww API Credentials (Replace with your actual credentials)
API_AUTH_TOKEN = "your_token"
 
# Initialize Groww API
groww = GrowwAPI(API_AUTH_TOKEN)
 
user_positions_response = groww.get_positions_for_user() # returns positions of both CASH and FNO segment.
cash_positions_response = groww.get_positions_for_user(segment=groww.SEGMENT_CASH) # returns positions of CASH segment.
 
print(user_positions_response)

Request Schema

NameTypeDescription
segmentstringSegment of the instrument such as CASH, FNO etc.

*required parameters

Response Payload

All prices in rupees

 
"positions": [
  {
    "trading_symbol": "RELIANCE",
    "segment": "CASH",
    "credit_quantity": 10,
    "credit_price": 12500,
    "debit_quantity": 5,
    "debit_price": 12000,
    "carry_forward_credit_quantity": 8,
    "carry_forward_credit_price": 12300,
    "carry_forward_debit_quantity": 3,
    "carry_forward_debit_price": 11800,
    "exchange": "NSE",
    "symbol_isin": "INE123A01016",
    "quantity": 15,
    "product": "CNC",
    "net_carry_forward_quantity": 10,
    "net_price": 12400,
    "net_carry_forward_price": 12200
  }
]

Response Schema

NameTypeDescription
trading_symbolstringTrading symbol of the instrument
segmentstringSegment of the instrument such as CASH, FNO etc.
credit_quantityintQuantity of credited instruments
credit_priceintAverage price in rupees of credited instruments
debit_quantityintQuantity of debited instruments
debit_priceintAverage price in rupees of debited instruments
carry_forward_credit_quantityintQuantity of carry forward credited instruments
carry_forward_credit_priceintAverage price in rupees of carry forward credited instruments
carry_forward_debit_quantityintQuantity of carry forward debited instruments
carry_forward_debit_priceintAverage price in rupees of carry forward debited instruments
exchangestringStock exchange
symbol_isinstringISIN (International Securities Identification number) of the symbol
quantityintNet quantity of instruments
productstringProduct type
net_carry_forward_quantityintNet carry forward quantity of instruments
net_priceintNet average price in rupees of instruments
net_carry_forward_priceintNet average price in rupees of carry forward instruments

Get Position for Symbol

Retrieve detailed position information for a specific symbol using this get_position_for_trading_symbol.

Python SDK Usage

from growwapi import GrowwAPI
 
# Groww API Credentials (Replace with your actual credentials)
API_AUTH_TOKEN = "your_token"
 
# Initialize Groww API
groww = GrowwAPI(API_AUTH_TOKEN)
 
trading_symbol_position_response = groww.get_position_for_trading_symbol(trading_symbol="RELIANCE", segment=groww.SEGMENT_CASH)
print(trading_symbol_position_response)

Request Schema

NameTypeDescription
trading_symbol *stringTrading symbol of the instrument.
segment *stringSegment of the instrument such as CASH, FNO etc.

*required parameter

Response Payload

All prices in rupees

{
  "positions": [
    {
      "trading_symbol": "RELIANCE",
      "segment": "CASH",
      "credit_quantity": 10,
      "credit_price": 12500,
      "debit_quantity": 5,
      "debit_price": 12000,
      "carry_forward_credit_quantity": 8,
      "carry_forward_credit_price": 12300,
      "carry_forward_debit_quantity": 3,
      "carry_forward_debit_price": 11800,
      "exchange": "NSE",
      "symbol_isin": "INE123A01016",
      "quantity": 15,
      "product": "CNC",
      "net_carry_forward_quantity": 10,
      "net_price": 12400,
      "net_carry_forward_price": 12200
    }
  ]
}

Response Schema

NameTypeDescription
trading_symbolstringTrading symbol of the instrument.
segmentstringSegment of the instrument such as CASH, FNO etc.
credit_quantityintQuantity of credited instruments
credit_priceintAverage price in rupees of credited instruments
debit_quantityintQuantity of debited instruments
debit_priceintAverage price in rupees of debited instruments
carry_forward_credit_quantityintQuantity of carry forward credited instruments
carry_forward_credit_priceintAverage price in rupees of carry forward credited instruments
carry_forward_debit_quantityintQuantity of carry forward debited instruments
carry_forward_debit_priceintAverage price in rupees of carry forward debited instruments
exchangestringStock exchange
symbol_isinstringISIN (International Securities Identification number) of the symbol
quantityintNet quantity of instruments
productstringProduct type
net_carry_forward_quantityintNet carry forward quantity of instruments
net_priceintNet average price in rupees of instruments
net_carry_forward_priceintNet average price in rupees of carry forward instruments

On this page