Groww LogoGroww API

Orders

This guide describes how to manage orders using the SDK. You can create, modify, cancel, and retrieve order details.

Place Order

Use the place_order SDK method to register a new order. When successful, the method returns a unique order ID and its initial status.

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)
 
place_order_response = groww.place_order(
    trading_symbol="WIPRO",
    quantity=1, 
    validity=groww.VALIDITY_DAY,
    exchange=groww.EXCHANGE_NSE,
    segment=groww.SEGMENT_CASH,
    product=groww.PRODUCT_CNC,
    order_type=groww.ORDER_TYPE_LIMIT,
    transaction_type=groww.TRANSACTION_TYPE_BUY,
    price=250,               # Optional: Price of the stock (for Limit orders)
    trigger_price=245,       # Optional: Trigger price (if applicable)
    order_reference_id="Ab-654321234-1628190"  # Optional: User provided 8 to 20 length alphanumeric reference ID to track the order
)
print(place_order_response)

Request Schema

NameTypeDescription
trading_symbol *stringTrading Symbol of the instrument as defined by the exchange
quantity *intQuantity of instrument to order
pricefloatPrice of the instrument in rupees case of Limit order
trigger_pricefloatTrigger price in rupees for the order
validity *stringValidity of the order
exchange *stringStock exchange
segment *stringSegment of the instrument such as CASH, FNO etc.
product *stringProduct type
order_type *stringOrder type
transaction_type *stringTransaction Type of the trade
order_reference_idstringUser provided 8 to 20 length alphanumeric string with atmost two hypens. (-)

*required parameters

Response

{
    "groww_order_id": "GMK39038RDT490CCVRO",
    "order_status": "OPEN",
    "order_reference_id": "Ab-654321234-1628190",
    "remark": "Order placed successfully"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
order_statusstringCurrent status of the placed order
order_reference_idstringUser provided reference id to track the status of an order.
remarkstringRemark for the order

Modify Order

You can change or update any pending or open orders using the modify_order 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)
 
modify_order_response = groww.modify_order(
    quantity=1,
    order_type=groww.ORDER_TYPE_MARKET,
    segment=groww.SEGMENT_CASH,
    groww_order_id="GMK39038RDT490CCVRO",
)
print(modify_order_response)

Request Schema

NameTypeDescription
quantity *intQuantity of instrument to order
pricefloatPrice of the instrument in rupees case of Limit order
trigger_pricefloatTrigger price in rupees for the order
order_type *stringOrder type
segment *stringSegment of the instrument such as CASH, FNO etc.
groww_order_id *stringOrder id generated by Groww for an order

*required parameters

Response

{
  "groww_order_id": "GMK39038RDT490CCVRO",
  "order_status": "OPEN"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
order_statusstringCurrent status of the placed order

Cancel Order

Cancel any pending or open order using the cancel_order 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)
 
cancel_order_response = groww.cancel_order(
    segment=groww.SEGMENT_CASH,
    groww_order_id="GMK39038RDT490CCVRO",
)
print(cancel_order_response)

Request Schema

NameTypeDescription
segment *stringSegment of the instrument such as CASH, FNO etc.
groww_order_id *stringOrder id generated by Groww for an order

*required parameters

Response

{
    "groww_order_id": "GMK39038RDT490CCVRO",
    "order_status": "OPEN"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
order_statusstringCurrent status of the placed order

Get Trades for Order

Retrieve details of trades executed for a particular order using this get_trade_list_for_order method. Maximum page_size is 50.

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)
 
trade_list_response = groww.get_trade_list_for_order(
    groww_order_id="GMK39038RDT490CCVRO",
    segment=groww.SEGMENT_CASH,
    page=0, # Optional: Page number for paginated results
    page_size=50 # Optional: Number of trades to fetch per page (default is 50)
)
print(trade_list_response)

Request Schema

NameTypeDescription
groww_order_id *stringOrder id generated by Groww for an order
segment *stringSegment of the instrument such as CASH, FNO etc.
page *intThe page number for paginated results, used to fetch trade details in multiple pages if there are many trades associated with the order.
page_size *intThe number of trades to fetch per page. Maximum is 50. If not provided, it will return the default 50 number of trades.

*required parameters

Response

All prices in rupees.

{
    "trade_list": [
      {
        "price": 250,
        "isin": "INE075A01022",
        "quantity": 1,
        "groww_order_id": "GMK39038RDT490CCVRO",
        "groww_trade_id": "",
        "exchange_trade_id": "202402120123456789",
        "exchange_order_id": "1100000057528630",
        "trade_status": "EXECUTED",
        "trading_symbol": "WIPRO",
        "remark": "Order placed successfully",
        "exchange": "NSE",
        "segment": "CASH",
        "product": "CNC",
        "transaction_type": "BUY",
        "created_at": "2019-08-24T14:15:22Z",
        "trade_date_time": "2019-08-24T14:15:22Z",
        "settlement_number": "2024052"
      }
    ]
}

Response Schema

NameTypeDescription
priceintPrice in rupees at which the trade was executed
isinstringISIN (International Securities Identification number) of the traded instrument.
quantityintNumber of shares or contracts traded in this execution.
groww_order_idstringOrder id generated by Groww for an order.
groww_trade_idstringUnique identifier for the executed trade within Groww's system.
exchange_trade_idstringTrade ID assigned by the exchange for the executed trade.
exchange_order_idstringOrder ID assigned by the exchange for tracking purposes.
trade_statusstringCurrent status of the trade
trading_symbolstringTrading symbol of the instrument
exchangestringStock exchange
segmentstringSegment of the instrument such as CASH, FNO etc.
productstringProduct type
transaction_typestringTransaction Type of the trade
created_atstring(date-time)Timestamp when the order was created in the system.
trade_date_timestring(date-time)Timestamp when the trade was executed on the exchange.
settlement_numberstringSettlement ID associated with the trade

Get Order Status

Check the status of an order using this get_order_status 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)
 
order_status_response = groww.get_order_status(
    groww_order_id="GMK39038RDT490CCVRO",
    segment=groww.SEGMENT_CASH,
)
print(order_status_response)

Request Schema

NameTypeDescription
groww_order_id *stringOrder id generated by Groww for an order
segment *stringSegment of the instrument such as CASH, FNO etc.

*required parameters

Response

{
    "groww_order_id": "GMK39038RDT490CCVRO",
    "order_status": "OPEN",
    "remark": "Order placed successfully",
    "filled_quantity": 100,
    "order_reference_id": "Ab-654321234-1628190"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
order_statusstringCurrent status of the placed order
remarkstringRemark for the order
filled_quantityintQuantity of the order which has been executed.
order_reference_idstringUser provided reference id to track the status of an order

Get Order Status by Reference ID

Check the order status of an order using this get_order_status_by_reference 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)
 
order_status_by_ref_response = groww.get_order_status_by_reference(
    order_reference_id="Ab-654321234-1628190",
    segment=groww.SEGMENT_CASH,
)
print(order_status_by_ref_response)

Request Schema

NameTypeDescription
order_reference_id *stringUser provided reference id to track the status of an order.
segment *stringSegment of the instrument such as CASH, FNO etc.

*required parameters

Response

{
    "groww_order_id": "GMK39038RDT490CCVRO",
    "order_status": "OPEN",
    "remark": "Order placed successfully",
    "filled_quantity": 100,
    "order_reference_id": "Ab-654321234-1628190"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
order_statusstringCurrent status of the placed order
remarkstringRemark for the order
filled_quantityintQuantity of the order which has been executed.
order_reference_idstringUser provided reference id to track the status of an order

Get Order List

Review all your orders placed during the day (open, pending, or executed) using the get_order_list method. Maximum page_size is 100.

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)
 
order_list_response = groww.get_order_list( # get order list of both CASH and FNO segments.
    page = 0, # Optional: Page number for paginated results
    page_size = 100 # Optional: Number of orders to fetch per page (default is 100)
)
 
cash_order_list_response = groww.get_order_list( # get order list of both CASH segment.
    segment=groww.SEGMENT_CASH,
    page = 0, # Optional: Page number for paginated results
    page_size = 100 # Optional: Number of orders to fetch per page (default is 100)
)
 
print(order_list_response)

Request Schema

NameTypeDescription
segmentstringSegment of the instrument such as CASH, FNO etc.
pageintRepresents the page number to fetch the order list results if there are many orders.
page_sizeintRepresents the number of orders to fetch per page. Maximum is 25. If not provided, it will return the default 25 number of orders.

*required parameters

Response

All prices in rupees.

{
    "order_list": [
        {
            "groww_order_id": "GMK39038RDT490CCVRO",
            "trading_symbol": "WIPRO",
            "order_status": "OPEN",
            "remark": "Order placed successfully",
            "quantity": 100,
            "price": 250,
            "trigger_price": 245,
            "filled_quantity": 100,
            "remaining_quantity": 10,
            "average_fill_price": 250,
            "deliverable_quantity": 10,
            "amo_status": "PENDING",
            "validity": "DAY",
            "exchange": "NSE",
            "order_type": "MARKET",
            "transaction_type": "BUY",
            "segment": "CASH",
            "product": "CNC",
            "created_at": "2019-08-24T14:15:22Z",
            "exchange_time": "2019-08-24T14:15:22Z",
            "trade_date": "2019-08-24T14:15:22Z",
            "order_reference_id": "Ab-654321234-1628190"
        }
    ]
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
trading_symbolstringGroww specific trading symbol of the instrument
order_statusstringCurrent status of the placed order
remarkstringRemark for the order
quantityintQuantity of the instrument to order
priceintPrice of the instrument in rupees case of Limit order
trigger_priceintTrigger price in rupees for the order
filled_quantityintQuantity of the order which has been executed.
remaining_quantityintQuantity remained to be filled
average_fill_priceintAvg price of the order placed
deliverable_quantityintThe number of shares that are eligible for delivery
amo_statusstringStatus of the order placed after market. (Not applicable during market hours.)
validitystringValidity of the order
exchangestringStock exchange
order_typestringOrder type
transaction_typestringTransaction type of the trade
segmentstringSegment of the instrument such as CASH, FNO etc.
productstringProduct type
created_atstring(date-time)Timestamp when the order was created in the system.
exchange_timestring(date-time)Timestamp when the order was processed or acknowledged by the exchange.
trade_datestring(date-time)Date on which trade has taken place
order_reference_idstringUser provided reference id to track the status of an order

Get Order Details

View detailed information about a specific order using this get_order_detail 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)
 
order_detail_response = groww.get_order_detail(
    groww_order_id="GMK39038RDT490CCVRO",
    segment=groww.SEGMENT_CASH,
)
print(order_detail_response)

Request Schema

NameTypeDescription
groww_order_id *stringOrder id generated by Groww for an order
segment *stringSegment of the instrument such as CASH, FNO etc.

*required parameters

Response

All prices in rupees.

{
    "groww_order_id": "GMK39038RDT490CCVRO",
    "trading_symbol": "WIPRO",
    "order_status": "OPEN",
    "remark": "Order placed successfully",
    "quantity": 100,
    "price": 250,
    "trigger_price": 245,
    "filled_quantity": 100,
    "remaining_quantity": 10,
    "average_fill_price": 250,
    "deliverable_quantity": 10,
    "amo_status": "PENDING",
    "validity": "DAY",
    "exchange": "NSE",
    "order_type": "MARKET",
    "transaction_type": "BUY",
    "segment": "CASH",
    "product": "CNC",
    "created_at": "2019-08-24T14:15:22Z",
    "exchange_time": "2019-08-24T14:15:22Z",
    "trade_date": "2019-08-24T14:15:22Z",
    "order_reference_id": "Ab-654321234-1628190"
}

Response Schema

NameTypeDescription
groww_order_idstringOrder id generated by Groww for an order
trading_symbolstringGroww specific trading symbol of the instrument
order_statusstringCurrent status of the placed order
remarkstringRemark for the order
quantityintQuantity of the instrument to order
priceintPrice of the instrument in rupees case of Limit order
trigger_priceintTrigger price in rupees for the order
filled_quantityintQuantity of the order which has been executed.
remaining_quantityintQuantity remained to be filled
average_fill_priceintAvg price of the order placed
deliverable_quantityintThe number of shares that are eligible for delivery
amo_statusstringStatus of the order placed after market (Not applicable during market hours.)
validitystringValidity of the order
exchangestringStock exchange
order_typestringOrder type
transaction_typestringTransaction type of the trade
segmentstringSegment of the instrument such as CASH, FNO etc.
productstringProduct type
created_atstring(date-time)Timestamp when the order was created in the system.
exchange_timestring(date-time)Timestamp when the order was processed or acknowledged by the exchange.
trade_datestring(date-time)Date on which trade has taken place
order_reference_idstringUser provided reference id to track the status of an order

On this page