Groww LogoGroww API

Introduction

Welcome to the Groww Trading API! Our APIs enable you to build and automate trading strategies with seamless access to real-time market data, order placement, portfolio management, and more. Whether you're an experienced algo trader or just starting with automation, Groww's API is designed to be simple, powerful, and developer-friendly.

This documentation focuses on using cURL to interact with the Groww Trading APIs. It provides step-by-step instructions, examples, and best practices for making API requests, handling responses, and integrating Groww's trading functionalities into your applications. Whether you're placing orders, fetching market data, or managing your portfolio, this guide will help you leverage cURL effectively for seamless API integration.

Getting Started

Step 1: Prerequisites

Trading on Groww using Groww APIs requires:

  • A Groww account.
  • Basic knowledge of REST APIs.
  • Having an active Trading API Subscription. You can purchase a subscription from this page.

Step 2: Authentication

There are two ways you can interact with GrowwAPI:

1st Approach: Access Token

(Expires daily at 6:00 AM)

To generate an API access token:

  • Log in to your Groww account.
  • Click on the profile section at the Right-top of your screen.
  • Click on the setting icon in the menu.
  • In the navigation list, select ‘Trading APIs’
  • Click on ‘Generate API keys’ and select ‘Access Token’
  • You can create, revoke and manage all your tokens from this page.
# You can also use wget
curl -X GET https://api.groww.in/v1/order/detail/{groww_order_id}?segment=CASH \
  -H 'Accept: application/json' \
  -H 'Authorization: YOUR_GENERATED_ACCESS_TOKEN' \
  -H 'X-API-VERSION: 1.0'

You can create, revoke and manage all your tokens from this page.

2nd Approach: TOTP Flow

(Uses API Key and Secret — No Expiry) To learn about TOTP flow, check out this page.

API Request and Response structure

Headers

All requests must have following headers. Providing the generated access token in the Authorization header .

Header NameHeader Value
AuthorizationBearer {ACCESS_TOKEN}
Acceptapplication/json
X-API-VERSION1.0

Request structure

GET Requests: Send the required parameters as query parameters in the request. For example,

# You can also use wget
curl -X GET https://api.groww.in/v1/order/detail/{groww_order_id}?segment=CASH \
  -H 'Accept: application/json' \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'X-API-VERSION: 1.0'
{
  "status": "SUCCESS",
  "payload": {
    "groww_order_id": "GMK39038RDT490CCVRO",
    "trading_symbol": "RELIANCE-EQ",
    "order_status": "OPEN",
    "remark": "Order placed successfully",
    "quantity": 100,
    "price": 2500,
    "trigger_price": 2450,
    "filled_quantity": 100,
    "remaining_quantity": 10,
    "average_fill_price": 2500,
    "deliverable_quantity": 10,
    "amo_status": "PENDING",
    "validity": "DAY",
    "exchange": "NSE",
    "order_type": "MARKET",
    "transaction_type": "BUY",
    "segment": "CASH",
    "product": "CNC",
    "created_at": "2023-10-01T10:15:30",
    "exchange_time": "2023-10-01T10:15:30",
    "trade_date": "2019-08-24T14:15:22Z",
    "order_reference_id": "Ab-654321234-1628190"
  }
}

POST Requests: Parameters are sent in the request body as JSON. For example,

    curl -X POST https://api.groww.in/v1/order/create \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {ACCESS_TOKEN}' \
      -H 'X-API-VERSION: 1.0' \
      -d '{
        "validity": "DAY",
        "exchange": "NSE",
        "transaction_type": "BUY",
        "order_type": "MARKET",
        "price": 0,
        "product": "CNC",
        "quantity": 1,
        "segment": "CASH",
        "trading_symbol": "IDEA"
    }'

Responses from the API are always JSON.

Successful Request (HTTP 200 OK)

When a request is successfully processed, the API returns a JSON object with a status field set to SUCCESS. The payload field contains the requested data.

{
    "status": "SUCCESS",
    "payload": {
        "symbolIsin": "INE002A01018",
        "productWisePositions": {}
    }
}

Failed Request (HTTP 40x or 50x)

If a request fails, the API returns a JSON object with a status field set to FAILURE. The error field contains details about the failure.

{
    "status": "FAILURE",
    "error": {
        "code": "GA001",
        "message": "Invalid trading symbol.",
        "metadata": null
    }
}

Error Codes

CodeMessage
GA000Internal error occurred
GA001Bad request
GA003Unable to serve request currently
GA004Requested entity does not exist
GA005User not authorised to perform this operation
GA006Cannot process this request
GA007Duplicate order reference id

Rate Limits

The rate limits are applied at the type level, not on individual APIs. This means that all APIs grouped under a type (e.g., Orders, Live Data, Non Trading) share the same limit. If the limit for one API within a type is exhausted, all other APIs in that type will also be rate-limited until the limit window resets.

TypeRequestsLimit (Per second)Limit (Per minute)Limit (Per Day)
OrdersCreate, Modify and Cancel Order152503000
Live DataMarket Quote, LTP, OHLC103005000
Non TradingOrder Status, Order list, Trade list, Positions, Holdings, Margin102503000

On this page