Groww LogoGroww API

Introduction

Guide explaining the usage of apis

Getting Started

Generate Access Token

  1. Go to Trading APIs page in Groww.
  2. Click on Generate Token.
  3. Copy token.

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 {API_KEY}
Acceptapplication/json

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/api/apex/v1/order/detail/{groww_order_id}?segment=CASH \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'
{
  "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": "87654321"
  }
}

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

    curl -X POST https://api.groww.in/v1/api/apex/v1/order/create \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {API_KEY}' \
      -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

On this page