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
Request Schema
Name | Type | Description |
---|---|---|
trading_symbol * | string | Trading Symbol of the instrument as defined by the exchange |
quantity * | int | Quantity of instrument to order |
price | float | Price of the instrument in rupees case of Limit order |
trigger_price | float | Trigger price in rupees for the order |
validity * | string | Validity of the order |
exchange * | string | Stock exchange |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
product * | string | Product type |
order_type * | string | Order type |
transaction_type * | string | Transaction Type of the trade |
order_reference_id | string | User provided 8 to 20 length alphanumeric string with atmost two hypens. (-) |
*
required parameters
Response
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
order_status | string | Current status of the placed order |
order_reference_id | string | User provided reference id to track the status of an order. |
remark | string | Remark for the order |
Modify Order
You can change or update any pending or open orders using the modify_order
method.
Python SDK Usage
Request Schema
Name | Type | Description |
---|---|---|
quantity * | int | Quantity of instrument to order |
price | float | Price of the instrument in rupees case of Limit order |
trigger_price | float | Trigger price in rupees for the order |
order_type * | string | Order type |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
groww_order_id * | string | Order id generated by Groww for an order |
*
required parameters
Response
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
order_status | string | Current status of the placed order |
Cancel Order
Cancel any pending or open order using the cancel_order
method.
Python SDK Usage
Request Schema
Name | Type | Description |
---|---|---|
segment * | string | Segment of the instrument such as CASH, FNO etc. |
groww_order_id * | string | Order id generated by Groww for an order |
*
required parameters
Response
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
order_status | string | Current 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
Request Schema
Name | Type | Description |
---|---|---|
groww_order_id * | string | Order id generated by Groww for an order |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
page * | int | The page number for paginated results, used to fetch trade details in multiple pages if there are many trades associated with the order. |
page_size * | int | The 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.
Response Schema
Name | Type | Description |
---|---|---|
price | int | Price in rupees at which the trade was executed |
isin | string | ISIN (International Securities Identification number) of the traded instrument. |
quantity | int | Number of shares or contracts traded in this execution. |
groww_order_id | string | Order id generated by Groww for an order. |
groww_trade_id | string | Unique identifier for the executed trade within Groww's system. |
exchange_trade_id | string | Trade ID assigned by the exchange for the executed trade. |
exchange_order_id | string | Order ID assigned by the exchange for tracking purposes. |
trade_status | string | Current status of the trade |
trading_symbol | string | Trading symbol of the instrument |
exchange | string | Stock exchange |
segment | string | Segment of the instrument such as CASH, FNO etc. |
product | string | Product type |
transaction_type | string | Transaction Type of the trade |
created_at | string(date-time) | Timestamp when the order was created in the system. |
trade_date_time | string(date-time) | Timestamp when the trade was executed on the exchange. |
settlement_number | string | Settlement ID associated with the trade |
Get Order Status
Check the status of an order using this get_order_status
method.
Python SDK Usage
Request Schema
Name | Type | Description |
---|---|---|
groww_order_id * | string | Order id generated by Groww for an order |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
*
required parameters
Response
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
order_status | string | Current status of the placed order |
remark | string | Remark for the order |
filled_quantity | int | Quantity of the order which has been executed. |
order_reference_id | string | User 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
Request Schema
Name | Type | Description |
---|---|---|
order_reference_id * | string | User provided reference id to track the status of an order. |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
*
required parameters
Response
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
order_status | string | Current status of the placed order |
remark | string | Remark for the order |
filled_quantity | int | Quantity of the order which has been executed. |
order_reference_id | string | User 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
Request Schema
Name | Type | Description |
---|---|---|
segment | string | Segment of the instrument such as CASH, FNO etc. |
page | int | Represents the page number to fetch the order list results if there are many orders. |
page_size | int | Represents 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.
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
trading_symbol | string | Groww specific trading symbol of the instrument |
order_status | string | Current status of the placed order |
remark | string | Remark for the order |
quantity | int | Quantity of the instrument to order |
price | int | Price of the instrument in rupees case of Limit order |
trigger_price | int | Trigger price in rupees for the order |
filled_quantity | int | Quantity of the order which has been executed. |
remaining_quantity | int | Quantity remained to be filled |
average_fill_price | int | Avg price of the order placed |
deliverable_quantity | int | The number of shares that are eligible for delivery |
amo_status | string | Status of the order placed after market. (Not applicable during market hours.) |
validity | string | Validity of the order |
exchange | string | Stock exchange |
order_type | string | Order type |
transaction_type | string | Transaction type of the trade |
segment | string | Segment of the instrument such as CASH, FNO etc. |
product | string | Product type |
created_at | string(date-time) | Timestamp when the order was created in the system. |
exchange_time | string(date-time) | Timestamp when the order was processed or acknowledged by the exchange. |
trade_date | string(date-time) | Date on which trade has taken place |
order_reference_id | string | User 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
Request Schema
Name | Type | Description |
---|---|---|
groww_order_id * | string | Order id generated by Groww for an order |
segment * | string | Segment of the instrument such as CASH, FNO etc. |
*
required parameters
Response
All prices in rupees.
Response Schema
Name | Type | Description |
---|---|---|
groww_order_id | string | Order id generated by Groww for an order |
trading_symbol | string | Groww specific trading symbol of the instrument |
order_status | string | Current status of the placed order |
remark | string | Remark for the order |
quantity | int | Quantity of the instrument to order |
price | int | Price of the instrument in rupees case of Limit order |
trigger_price | int | Trigger price in rupees for the order |
filled_quantity | int | Quantity of the order which has been executed. |
remaining_quantity | int | Quantity remained to be filled |
average_fill_price | int | Avg price of the order placed |
deliverable_quantity | int | The number of shares that are eligible for delivery |
amo_status | string | Status of the order placed after market (Not applicable during market hours.) |
validity | string | Validity of the order |
exchange | string | Stock exchange |
order_type | string | Order type |
transaction_type | string | Transaction type of the trade |
segment | string | Segment of the instrument such as CASH, FNO etc. |
product | string | Product type |
created_at | string(date-time) | Timestamp when the order was created in the system. |
exchange_time | string(date-time) | Timestamp when the order was processed or acknowledged by the exchange. |
trade_date | string(date-time) | Date on which trade has taken place |
order_reference_id | string | User provided reference id to track the status of an order |