Skip to main content

Webhook

During the app registration process, users have the option to specify an open POST API as their webhook URL. On configuring the postback URL, order updates will be instantaneously transmitted to this address.

As part of the webhook flow, users can receive both:

  • Order Updates
  • GTT Order Updates

When registering an app, users can choose what type of updates they wish to receive. By default, order updates are enabled. To receive GTT order updates, users must explicitly enable this by editing their app’s configuration from the My Apps page.


Postback Setup


The webhook endpoint:

  • Should not require authentication.
  • Should respond with a 2XX status.
  • Must be open to receive POST requests.

The payloads sent to the webhook URL will be identical to the updates received via WebSocket.

Response structure:

{
"update_type": "order",
"user_id": "******",
"userId": "******",
"exchange": "NSE",
"instrument_token": "NSE_EQ|INE848E01016",
"instrument_key": "NSE_EQ|INE848E01016",
"trading_symbol": "NHPC-EQ",
"tradingsymbol": "NHPC-EQ",
"product": "D",
"order_type": "MARKET",
"average_price": 0,
"price": 0,
"trigger_price": 0,
"quantity": 1,
"disclosed_quantity": 0,
"pending_quantity": 1,
"transaction_type": "BUY",
"order_ref_id": "57744821658411",
"exchange_order_id": "",
"parent_order_id": null,
"validity": "DAY",
"status": "put order req received",
"is_amo": false,
"variety": "SIMPLE",
"tag": null,
"exchange_timestamp": null,
"status_message": "",
"order_id": "240221025997024",
"order_request_id": "1",
"order_timestamp": "2024-02-21 14:40:02",
"filled_quantity": 0,
"guid": null,
"placed_by": "******",
"status_message_raw": null
}
Notice of Deprecation

The lowercase field (tradingsymbol) is deprecated and will be removed in future versions. Use the snake_case versions for consistency.


NOTE
  • While creating app provide a webhook URL which is in your control rather than a public endpoint.