Postbacks / Webhooks
Postbacks
When an order's status changes, the Postback API sends a POST request with a JSON payload to the post back url mentioned on the developer portal for the particular app registered. This ensures that you receive timely updates about your orders, regardless of when they occur (PENDING, CANCELED, OPEN, REJECTED, COMPLETE, TRIGGER_PENDING).
Note
We recommend using the Webhooks for instant updates as they are fastest method of retrieving any order status
Webhooks
The Webhooks enables the user to get any updates related to the ORDER STATUS in realtime over Websocket connection.
Status Type | Endpoint |
---|---|
PENDING | Order has been acknowledged by the OMS |
CANCELED | Order is Canceled |
OPEN | Order has been received to the Exchange and is in Open State |
REJECTED | Order has been rejected by the OMS or the Exchange |
COMPLETE | Order has been completed (It can be a partial fill as well) |
TRIGGER_PENDING | Order has been received but is yet to be triggered |
Pending Order
Sample Order Update for PENDING Order
{
"id": "24031200000023",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY13MAR24C47300",
"qty": "15",
"price": "334.95",
"product": "I",
"status": "PENDING",
"reportType": "NewAck",
"transactionType": "B",
"order": "LMT",
"retention": "DAY",
"avgPrice": "",
"reason": " ",
"exchangeOrderId": "",
"cancelQty": "",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "",
"exchangeTime": "",
"timestamp": "1710231383"
}
Canceled Order
Sample Order Update for CANCELED Order
{
"id": "24031200000036",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "NIFTY28MAR24F",
"qty": "50",
"price": "22300.00",
"product": "I",
"status": "CANCELED",
"reportType": "Canceled",
"transactionType": "B",
"order": "LMT",
"retention": "DAY",
"avgPrice": "",
"reason": " ",
"exchangeOrderId": "1000000000245043",
"cancelQty": "50",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "",
"exchangeTime": "12-03-2024 13:55:55",
"timestamp": "1710231947"
}
Open Order
Sample Order Update for OPEN Order
{
"id": "24031200000035",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "NIFTY28MAR24F",
"qty": "1500",
"price": "22484.20",
"product": "I",
"status": "OPEN",
"reportType": "New",
"transactionType": "B",
"order": "LMT",
"retention": "DAY",
"avgPrice": "",
"reason": " ",
"exchangeOrderId": "1000000000244618",
"cancelQty": "",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "",
"exchangeTime": "12-03-2024 13:53:04",
"timestamp": "1710231777"
}
Rejected Order
Sample Order Update for REJECTED Order
{
"id": "24031200000024",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "BANKNIFTY27MAR24C47500",
"qty": "15",
"price": "730.95",
"product": "I",
"status": "REJECTED",
"reportType": "Rejected",
"transactionType": "B",
"order": "LMT",
"retention": "DAY",
"avgPrice": "",
"reason": "16273 Record does not exist",
"exchangeOrderId": "1100000000026651",
"cancelQty": "",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "",
"exchangeTime": "01-01-1980 00:00:00",
"timestamp": "1710231564"
}
Complete Order
Sample Order Update for COMPLETE Order
{
"id": "24031200000025",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "NIFTY28MAR24F",
"qty": "50",
"price": "22484.20",
"product": "I",
"status": "COMPLETE",
"reportType": "Fill",
"transactionType": "B",
"order": "LMT",
"retention": "DAY",
"fillShares": "50",
"avgPrice": "22476.30",
"fillTime": "12-03-2024 13:51:24",
"fillID": "202318",
"fillQty": "50",
"fillPrice": "22476.30",
"reason": " ",
"exchangeOrderId": "1000000000244480",
"cancelQty": "",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "",
"exchangeTime": "12-03-2024 13:51:24",
"timestamp": "1710231676"
}
Trigger Pending Order
Sample Order Update for TRIGGER_PENDING Order
{
"id": "24031200000038",
"type": "orderUpdate",
"userId": "AJ0101",
"exchange": "NFO",
"symbol": "NIFTY28MAR24F",
"qty": "1000",
"price": "22450.00",
"product": "I",
"status": "TRIGGER_PENDING",
"reportType": "TriggerPending",
"transactionType": "S",
"order": "SL-LMT",
"retention": "DAY",
"avgPrice": "",
"reason": " ",
"exchangeOrderId": "1000000000245566",
"cancelQty": "",
"remarks": "",
"disclosedQty": "0",
"triggerPrice": "22450.00",
"exchangeTime": "12-03-2024 13:57:18",
"timestamp": "1710232031"
}