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.
statusvalues: 1 Cancelled, 2 Traded / Filled, 4 Transit, 5 Rejected, 6 Pending, 7 Expired. Value 3 is not used.filledQtyandremainingQuantityshow how much of the order has traded, which covers partial fills.tradedPriceis the average traded price.messagecarries the error text, for example when an order is rejected.offlineOrderis 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.
| Attribute | Data Type | Description |
|---|---|---|
| id | string | The unique order ID assigned for each order |
| exchOrdId | string | The order ID provided by the exchange |
| symbol | string | The symbol for which the order is placed |
| qty | int | The original order quantity |
| remainingQuantity | int | The remaining quantity |
| filledQty | int | The filled quantity after partial trades |
| status | int | 1 => Canceled, 2 => Traded / Filled, 3 => (Not used currently), 4 => Transit, 5 => Rejected, 6 => Pending, 7 => Expired. |
| message | string | The error messages are shown here |
| segment | int | 10 (Equity), 11 (F&O), 12 (Currency), 20 (Commodity). View Details |
| limitPrice | float | The limit price for the order |
| stopPrice | float | The stop price for the order |
| productType | string | The product type |
| type | int | 1 => Limit Order, 2 => Market Order, 3 => Stop Order (SL-M), 4 => Stop Limit Order (SL-L). View Details |
| side | int | Disclosed quantity: 1 => Buy, -1 => Sell. View Details |
| disclosedQty | int | Disclosed quantity |
| dqQtyRem | int | Remaining disclosed quantity |
| orderValidity | string | DAY, IOC |
| orderDateTime | string | The datetime object here will be in epoch timestamp |
| tradedPrice | float | The average traded price for the order |
| source | string | Source from where the order was placed. View Details |
| fytoken | string | Fytoken is a unique identifier for every symbol. View Details |
| offlineOrder | boolean | False => When the market is open, True => When placing AMO order |
| pan | string | PAN of the client |
| clientId | string | The client ID of the Fyers user |
| exchange | int | The exchange in which the order is placed. View Details |
| instrument | string | Exchange 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