Groww LogoGroww API

Smart Orders

Create, modify, cancel, get and list Smart Orders using simple cURL recipes.

Smart Orders help you automate entries/exits with minimal code. Two types are supported today:

  • GTT (Good Till Triggered): Triggers a single order when price crosses your trigger
  • OCO (One Cancels the Other): Places target and stop-loss together; execution of one cancels the other

Note: The COMMODITY segment is not supported for Smart Orders. OCO orders for CASH segment are currently not supported.

Create GTT

POST https://api.groww.in/v1/order-advance/create

Create a GTT that arms a single order when your trigger condition is met.

Request

curl -X POST https://api.groww.in/v1/order-advance/create \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Body parameter

{
  "reference_id": "sref-unique-123",
  "smart_order_type": "GTT",
  "segment": "CASH",
  "trading_symbol": "TCS",
  "quantity": 10,
  "trigger_price": "3985.00",
  "trigger_direction": "DOWN",
  "order": {"order_type": "LIMIT", "price": "3990.00", "transaction_type": "BUY"},
  "product_type": "CNC",
  "exchange": "NSE",
  "duration": "DAY"
}

Request schema

NameTypeDescription
reference_id *stringUser-provided alphanumeric string (8-20 characters) that serves as an idempotency key, with at most two hyphens (-) allowed.
smart_order_type *stringSet to GTT to create a Good‑Till‑Triggered smart order. Example: GTT.
segment *stringSegment for which the order will be placed. See Segment. Examples: CASH, FNO.
trading_symbol *stringTrading Symbol of the instrument as defined by the exchange
quantity *integerQuantity for the post‑trigger order. For FNO, must respect lot size. Examples: 10, 50.
trigger_price *stringTrigger price as a decimal string. Example: 3985.00.
trigger_direction *stringDirection to monitor relative to the trigger price. Examples: UP, DOWN.
order.order_type *stringPost‑trigger execution order type. See Order type. Examples: LIMIT, SL.
order.pricestringPost‑trigger limit price (required if order.order_type is LIMIT or SL). Example: 3990.00.
order.transaction_type *stringPost‑trigger transaction type. See Transaction type. Examples: BUY, SELL.
child_legsobjectOptional child legs for bracket orders (target/stop‑loss).
product_type *stringProduct for the post‑trigger order. See Product type. Examples: CNC, MIS.
exchange *stringExchange where the instrument is traded. See Exchange. Examples: NSE.
duration *stringValidity of the post‑trigger order. See Validity. Example: DAY.

*required parameters

Response (201)

{
  "status": "SUCCESS",
  "payload": {
    "smart_order_id": "gtt_91a7f4",
    "smart_order_type": "GTT",
    "status": "ACTIVE",
    "trading_symbol": "TCS",
    "exchange": "NSE",
    "quantity": 10,
    "product_type": "CNC",
    "duration": "DAY",
    "order": {"order_type": "LIMIT", "price": "3990.00", "transaction_type": "BUY"},
    "trigger_direction": "DOWN",
    "trigger_price": "3985.00",
    "is_cancellation_allowed": true,
    "is_modification_allowed": true,
    "created_at": "2025-09-30T07:00:00",
    "expire_at": "2026-09-30T07:00:00",
    "triggered_at": null,
    "updated_at": "2025-09-30T07:00:00"
  }
}

Schema reference: Smart Order Response (GTT).

Create OCO

POST https://api.groww.in/v1/order-advance/create

Create an OCO to protect or exit positions with target and stop-loss.

Request

curl -X POST https://api.groww.in/v1/order-advance/create \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Body parameter

{
  "reference_id": "sref-unique-456",
  "smart_order_type": "OCO",
  "segment": "FNO",
  "trading_symbol": "NIFTY25OCT24000CE",
  "quantity": 50,
  "net_position_quantity": 50,
  "transaction_type": "SELL",
  "target": {"trigger_price": "120.50", "order_type": "LIMIT", "price": "121.00"},
  "stop_loss": {"trigger_price": "95.00", "order_type": "SL_M", "price": null},
  "product_type": "MIS",
  "exchange": "NSE",
  "duration": "DAY"
}

Request schema

NameTypeDescription
reference_id *stringUser-provided alphanumeric string (8-20 characters) that serves as an idempotency key, with at most two hyphens (-) allowed.
smart_order_type *stringSet to OCO to create a One‑Cancels‑Other smart order (target + stop‑loss). Example: OCO.
segment *stringSegment for which the order will be placed. See Segment. Examples: FNO, CASH.
trading_symbol *stringTrading Symbol of the instrument as defined by the exchange
quantity *integerTotal quantity for both legs. Must be ≤ abs(net_position_quantity). Example: 50.
net_position_quantity *integerYour current net position in this symbol. Used to derive leg directions and validate quantity. Example: 50.
transaction_type *stringDirection of protection/exit for your position. See Transaction type. Examples: BUY, SELL.
target.trigger_price *stringTake‑profit trigger price (decimal string). Example: 120.50.
target.order_type *stringOrder type for the target leg. See Order type. Examples: LIMIT, MARKET.
target.pricestringTarget leg limit price (required if target.order_type = LIMIT). Example: 121.00.
stop_loss.trigger_price *stringStop‑loss trigger price (decimal string). Example: 95.00.
stop_loss.order_type *stringOrder type for the stop‑loss leg. See Order type. Examples: SL, SL_M.
stop_loss.pricestringStop‑loss leg limit price (required if stop_loss.order_type = SL). Example: 94.50.
product_type *stringProduct for the OCO. See Product type. Note: For OCO in cash segment, only MIS is supported currently.
exchange *stringExchange for this instrument. See Exchange. Example: NSE.
duration *stringValidity for both legs. See Validity. Example: DAY.

*required parameters

Response (201)

{
  "status": "SUCCESS",
  "payload": {
    "smart_order_id": "oco_a12bc3",
    "smart_order_type": "OCO",
    "status": "ACTIVE",
    "trading_symbol": "NIFTY25OCT24000CE",
    "exchange": "NSE",
    "quantity": 50,
    "product_type": "MIS",
    "duration": "DAY",
    "target": {"trigger_price": "120.50", "order_type": "LIMIT", "price": "121.00"},
    "stop_loss": {"trigger_price": "95.00", "order_type": "SL_M", "price": null},
    "created_at": "2025-09-30T07:00:00",
    "expire_at": null,
    "triggered_at": null,
    "updated_at": "2025-09-30T07:00:00"
  }
}

Schema reference: Smart Order Response (OCO).

Notes

  • quantity must be ≤ abs(net_position_quantity).
  • If a leg executes, the other cancels automatically.

Modify Smart Order

PUT https://api.groww.in/v1/order-advance/modify/{smart_order_id}

Modify contracts differ by flow. Only the fields listed below are honoured; everything else is ignored or rejected. Use cancel + create when you need changes outside of these lists.

Modifiable Fields - GTT

  • quantity - Updated order quantity
  • trigger_price - Updated trigger price threshold
  • trigger_direction - Updated direction
  • order.order_type - Updated order type
  • order.price - Updated limit price (required for LIMIT/SL types; set to null for MARKET/SL_M)
  • child_legs - Updated bracket order legs (optional; all child leg fields are modifiable if provided)

Modifiable Fields - OCO

  • quantity - Updated order quantity
  • duration - Updated validity
  • product_type - Updated product (e.g., MIS ↔ NRML for FNO; CASH OCO only supports MIS)
  • target.trigger_price - Updated profit target trigger price
  • stop_loss.trigger_price - Updated stop-loss trigger price

Request (GTT)

curl -X PUT https://api.groww.in/v1/order-advance/modify/gtt_91a7f4 \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Body parameter (GTT)

{
  "smart_order_type": "GTT",
  "segment": "CASH",
  "quantity": 12,
  "trigger_price": "3980.00",
  "trigger_direction": "DOWN",
  "order": {"order_type": "LIMIT", "price": "3985.00", "transaction_type": "BUY"}
}

Request schema (GTT)

NameTypeDescription
smart_order_type *stringSet to GTT to modify a Good‑Till‑Triggered smart order. Example: GTT.
segment *stringSegment of the order (for routing). See Segment. Examples: CASH, FNO.
quantityintegerUpdated quantity.
trigger_pricestringUpdated trigger price (decimal string).
trigger_directionstringUpdated trigger direction. Examples: UP, DOWN.
order.order_typestringUpdated order type. See Order type.
order.pricestringUpdated limit price (required if order.order_type is LIMIT or SL).
order.transaction_typestringTransaction type (required but not modifiable). See Transaction type.
child_legsobjectUpdated child legs for bracket orders (target/stop‑loss).

*required parameters

Request (OCO)

curl -X PUT https://api.groww.in/v1/order-advance/modify/oco_a12bc3 \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Body parameter (OCO)

{
  "smart_order_type": "OCO",
  "segment": "FNO",
  "duration": "DAY",
  "quantity": 40,
  "product_type": "MIS",
  "target": { "trigger_price": "122.00" },
  "stop_loss": { "trigger_price": "97.50" }
}

Request schema (OCO)

NameTypeDescription
smart_order_type *stringSet to OCO to modify a One‑Cancels‑Other smart order. Example: OCO.
segment *stringSegment of the order (for routing). See Segment. Examples: FNO, CASH.
durationstringUpdated validity. See Validity. Modifiable for OCO.
quantityintegerUpdated total quantity.
product_typestringUpdated product. See Product type. Modifiable for OCO.
target.trigger_pricestringUpdated target trigger price (decimal string).
stop_loss.trigger_pricestringUpdated stop‑loss trigger price (decimal string).

*required parameters

Response (202)

{
  "status": "SUCCESS",
  "payload": { "smart_order_id": "oco_a12bc3", "smart_order_type": "OCO", "status": "ACTIVE", "quantity": 40 }
}

Schema reference: Smart Order Response (GTT) or Smart Order Response (OCO).

Modify vs Cancel-Create

What you need to changeGTTOCOAction
Quantity✅ Modify✅ ModifyUse modify
Trigger price✅ Modify✅ Modify (both legs)Use modify
Trigger direction✅ ModifyN/AUse modify
Order type✅ Modify❌ Not modifiableGTT: modify; OCO: cancel+create
Limit price✅ Modify❌ Not modifiableGTT: modify; OCO: cancel+create
Duration/validity❌ Not modifiable✅ ModifyOCO: modify; GTT: cancel+create
Product type❌ Not modifiable✅ ModifyOCO: modify; GTT: cancel+create
Symbol/contract❌ Not modifiable❌ Not modifiableCancel + create
Exchange❌ Not modifiable❌ Not modifiableCancel + create
Segment❌ Not modifiable❌ Not modifiableCancel + create
Smart order type (GTT ↔ OCO)❌ Not modifiable❌ Not modifiableCancel + create

Note: When a field is marked as "Not modifiable" (❌), you must cancel the existing smart order and create a new one with the desired changes. The "N/A" designation indicates that the feature does not apply to that smart order type.

Cancel Smart Order

POST https://api.groww.in/v1/order-advance/cancel/{segment}/{smart_order_type}/{smart_order_id}

Cancel any active smart order.

Request

curl -X POST https://api.groww.in/v1/order-advance/cancel/CASH/GTT/gtt_91a7f4 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Request schema

NameTypeDescription
segment *stringSegment of the smart order to cancel. See Segment. Examples: CASH, FNO.
smart_order_type *stringSmart order type. Examples: GTT, OCO.
smart_order_id *stringSmart order identifier. Example: gtt_91a7f4.

*required parameters

Response (202)

{
  "status": "SUCCESS",
  "payload": { "smart_order_id": "gtt_91a7f4", "smart_order_type": "GTT", "status": "CANCELLED" }
}

Schema reference: Smart Order Response (GTT) or Smart Order Response (OCO).

Response Schema

NameTypeDescription
statusstringSUCCESS if processed successfully, FAILURE otherwise
smart_order_idstringSmart order identifier
smart_order_typestringSmart order type. Examples: GTT, OCO.
statusstringCANCELLED on success

Get Smart Order

GET https://api.groww.in/v1/order-advance/status/{segment}/{smart_order_type}/internal/{smart_order_id}

Request

curl -X GET \
  'https://api.groww.in/v1/order-advance/status/CASH/GTT/internal/gtt_91a7f4' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Request schema

NameTypeDescription
segment *stringSegment of the smart order to fetch. See Segment. Examples: CASH, FNO.
smart_order_type *stringSmart order type. Examples: GTT, OCO.
smart_order_id *stringSmart order identifier. Example: gtt_91a7f4.

*required parameters

Response (200)

{
  "status": "SUCCESS",
  "payload": { /* Full smart order object: see schema below */ }
}

Schema reference: Smart Order Response (GTT) or Smart Order Response (OCO).

List Smart Orders

GET https://api.groww.in/v1/order-advance/list

Filter by type, segment, status and a time window. Pagination is supported.

Request

curl -X GET \
  'https://api.groww.in/v1/order-advance/list?segment=FNO&smart_order_type=OCO&status=ACTIVE&page=0&page_size=10&start_date_time=2025-01-16T09:15:00&end_date_time=2025-01-16T15:30:00' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'X-API-VERSION: 1.0'

Request schema

NameTypeDescription
segmentstringSegment to list smart orders for. See Segment. Examples: FNO, CASH.
smart_order_typestringSmart order type to create/list. Examples: OCO, GTT. Default: OCO.
statusstringCurrent state filter (live vs past). Examples: ACTIVE, CANCELLED, COMPLETED. Default: ACTIVE.
pageintegerPage number starting from 0. Use with page_size to paginate long lists. Examples: 0, 1. Min: 0, Max: 500. Default: 0.
page_sizeintegerNumber of records per page. Tune this for your UI/export. Examples: 10, 25. Min: 1, Max: 50. Default: 10.
start_date_timestringInclusive start of the time window in ISO8601 (YYYY-MM-DDThh:mm:ss). Defaults to start of today (server timezone). Examples: 2025-01-16T09:15:00, 2025-01-16T00:00:00.
end_date_timestringInclusive end of the time window in ISO8601. Must not be before start_date_time. Defaults to start of next day (server timezone). Examples: 2025-01-16T15:30:00, 2025-01-16T23:59:59.

Validations:

  • end_date_time must not be before start_date_time.
  • Date range between start_date_time and end_date_time must not exceed one month.

Response (200)

{
  "status": "SUCCESS",
  "payload": {
    "orders": [
      { "smart_order_id": "gtt_91a7f4", "smart_order_type": "GTT", "status": "ACTIVE" }
    ]
  }
}

Response Schema

NameTypeDescription
statusstringSUCCESS if processed successfully, FAILURE otherwise
ordersarrayList of smart orders
orders[]objectSmart order item (GTT or OCO). See Smart Order Response (GTT) or Smart Order Response (OCO)

Quick Tips

  • Use a unique reference_id per new smart order to avoid accidental duplicates.
  • For symbol/segment/type changes: cancel the old smart order and create a new one.
  • For OCO, ensure quantityabs(net_position_quantity). The leg directions are derived from your net position.

Schemas

Smart Order Response (GTT)

NameTypeDescription
statusstringSUCCESS if processed successfully, FAILURE otherwise
smart_order_idstringSmart order identifier
smart_order_typestringSmart order type. Example: GTT.
statusstringSmart order status (e.g., ACTIVE)
trading_symbolstringTrading Symbol of the instrument as defined by the exchange
exchangestringStock exchange
quantityintegerQuantity
product_typestringProduct type
durationstringValidity
order.order_typestringOrder type. See Order type. Examples: LIMIT, SL.
order.pricestringPrice for LIMIT/SL
order.transaction_typestringSee Transaction type. Examples: BUY, SELL.
ltpnumberLast traded price of the instrument
trigger_directionstringTrigger direction. Examples: UP, DOWN.
trigger_pricestringTrigger price (decimal string)
segmentstringMarket segment
remarkstringRemark or status message
display_namestringDisplay name for the instrument
child_legsobjectChild legs for bracket orders (target/stop‑loss)
is_cancellation_allowedbooleanWhether cancellation is allowed
is_modification_allowedbooleanWhether modification is allowed
created_atstringCreation time (ISO 8601)
expire_atstringExpiry time (ISO 8601)
triggered_atstringTrigger time (ISO 8601)
updated_atstringLast updated time (ISO 8601)

Smart Order Response (OCO)

NameTypeDescription
statusstringSUCCESS if processed successfully, FAILURE otherwise
smart_order_idstringSmart order identifier
smart_order_typestringSmart order type. Example: OCO.
statusstringSmart order status (e.g., ACTIVE)
trading_symbolstringTrading Symbol of the instrument as defined by the exchange
exchangestringStock exchange
quantityintegerQuantity of the order to be placed
product_typestringProduct type
durationstringValidity
target.trigger_pricestringTarget trigger price (decimal string)
target.order_typestringOrder type. See Order type. Examples: LIMIT, MARKET.
target.pricestringTarget limit price
stop_loss.trigger_pricestringStop-loss trigger price (decimal string)
stop_loss.order_typestringOrder type. See Order type. Examples: SL, SL_M.
stop_loss.pricestringStop-loss limit price
is_cancellation_allowedbooleanWhether cancellation is allowed
is_modification_allowedbooleanWhether modification is allowed
created_atstringCreation time (ISO 8601)
expire_atstringExpiry time (ISO 8601)
triggered_atstringTrigger time (ISO 8601)
updated_atstringLast updated time (ISO 8601)

On this page