Webhook
During the app registration process, users have the option to specify an open POST API as their webhook URL. If they choose to provide such a URL, all order updates will be promptly transmitted to this address. This endpoint is not required to have any authentication mechanisms in place, and it should respond with either a basic string or a JSON object. The payload sent by Upstox API to the webhook URL will be identical to the Order Stream Updates that are typically transmitted via WebSocket.
Response structure:
{
"exchange": "BSE",
"product": "D",
"price": 16.78,
"quantity": 1,
"status": "cancelled after market order",
"guid": null,
"tag": null,
"userId": "******",
"instrument_token": "BSE_EQ|INE306A01021",
"placed_by": "******",
"trading_symbol": "BAJAJHIND",
"tradingsymbol": "BAJAJHIND",
"order_type": "LIMIT",
"validity": "DAY",
"trigger_price": 0,
"disclosed_quantity": 0,
"transaction_type": "BUY",
"average_price": null,
"filled_quantity": 0,
"pending_quantity": 1,
"status_message": null,
"status_message_raw": null,
"exchange_order_id": "",
"parent_order_id": null,
"order_id": "230822025708869",
"variety": "SIMPLE",
"order_timestamp": "2023-08-23 08:11:57",
"exchange_timestamp": null,
"is_amo": false,
"order_request_id": null,
"order_ref_id": "4744398539148202487-53A8YA-JAPIA"
}
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.