Skip to Content

Webhook Response

USE CASE

Read the status, filled quantity and error message of an order from the posted payload.

Things to know

  • The JSON payload is posted as a raw HTTP POST body. Your server has to read the raw body.
  • status values: 1 Cancelled, 2 Traded / Filled, 4 Transit, 5 Rejected, 6 Pending, 7 Expired. Value 3 is not used.
  • filledQty and remainingQuantity show how much of the order has traded, which covers partial fills. tradedPrice is the average traded price.
  • message carries the error text, for example when an order is rejected.
  • offlineOrder is true when the order was placed as an AMO order.
  • Reply with HTTP status 200 to every post. Other responses or failed posts can get the URL blacklisted. See Blacklisting.

The JSON payload is posted as a raw HTTP POST body. You will have to read the raw body.

AttributeData TypeDescription
idstringThe unique order ID assigned for each order
exchOrdIdstringThe order ID provided by the exchange
symbolstringThe symbol for which the order is placed
qtyintThe original order quantity
remainingQuantityintThe remaining quantity
filledQtyintThe filled quantity after partial trades
statusint1 => Canceled, 2 => Traded / Filled, 3 => (Not used currently), 4 => Transit, 5 => Rejected, 6 => Pending, 7 => Expired.
messagestringThe error messages are shown here
segmentint10 (Equity), 11 (F&O), 12 (Currency), 20 (Commodity). View Details
limitPricefloatThe limit price for the order
stopPricefloatThe stop price for the order
productTypestringThe product type
typeint1 => Limit Order, 2 => Market Order, 3 => Stop Order (SL-M), 4 => Stop Limit Order (SL-L). View Details
sideintDisclosed quantity: 1 => Buy, -1 => Sell. View Details
disclosedQtyintDisclosed quantity
dqQtyRemintRemaining disclosed quantity
orderValiditystringDAY, IOC
orderDateTimestringThe datetime object here will be in epoch timestamp
tradedPricefloatThe average traded price for the order
sourcestringSource from where the order was placed. View Details
fytokenstringFytoken is a unique identifier for every symbol. View Details
offlineOrderbooleanFalse => When the market is open, True => When placing AMO order
panstringPAN of the client
clientIdstringThe client ID of the Fyers user
exchangeintThe exchange in which the order is placed. View Details
instrumentstringExchange instrument type. View Details

Sample response

{ "orderDateTime": "18-Jul-2023 11:44:29", "id": "23071800238607", "exchOrdId": "2500000061319029", "side": -1, "segment": 11, "instrument": 15, "productType": "MARGIN", "status": 2, "qty": 5400, "remainingQuantity": 0, "filledQty": 5400, "limitPrice": 2.15, "stopPrice": 0, "type": 2, "discloseQty": 0, "dqQtyRem": 0, "orderValidity": "DAY", "source": "M", "fyToken": "101123072754619", "offlineOrder": false, "message": "Completed", "orderNumStatus": "23071800238607:2", "tradedPrice": 2.15, "exchange": 10, "pan": "", "clientId": "xxxx", "symbol": "NSE:ABCAPITAL23JUL190CE" }
Last updated on