Skip to Content

GTT Order Book

This API allows you to fetch your GTT orders along with their trigger prices, quantities and current status.

USE CASE

Check whether your GTT orders are pending, traded, cancelled or rejected.

Details

  • You can fetch all pending GTT Orders.
  • Orders come back in the orderBook array. Use each order's id to modify or cancel it.
  • ord_status shows the state: 1 cancelled, 2 traded or filled, 4 in transit, 5 rejected, 6 pending. oms_msg carries the OMS message.
  • gtt_oco_ind tells the type: 1 for a GTT order and 2 for an OCO order.
  • The second-leg fields price2_limit, price2_trigger and qty2 apply only to OCO orders.
  • Each order also includes the current ltp, ltp_ch and ltp_chp of the symbol.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Response Attributes - For each order

AttributeData TypeDescription
codeint
  • Status code of the API response:
  • 200: Request successful.
  • Other codes represent specific error conditions.
messagestringOptional message about the API request (can be empty for successful requests).
sstringStatus of the request: "ok" for success, "error" for failure.
orderBookarrayList of order details.
orderBook[].client_idstringClient identifier associated with the order.
orderBook[].exchangeintExchange code where the order is placed, e.g., 10 for NSE.
orderBook[].fy_tokenstringUnique token for the instrument in the order.
orderBook[].id_fyersstringFyers system-generated unique identifier for the order.
orderBook[].idstringOrder ID provided by the system.
orderBook[].instrumentintInstrument type, e.g., 0 for equity.
orderBook[].lot_sizeintLot size of the instrument in the order.
orderBook[].multiplierintMultiplier for the instrument (e.g., for derivatives).
orderBook[].ord_statusint
  • Order status code:
  • 1: Cancelled
  • 2: Traded / Filled
  • 3: For future use
  • 4: Transit
  • 5: Rejected
  • 6: Pending
orderBook[].precisionintDecimal precision for the instrument's price.
orderBook[].price_limitfloatLimit price for the first leg of the order.
orderBook[].price2_limitfloatLimit price for the second leg (if OCO).
orderBook[].price_triggerfloatTrigger price for the first leg of the order.
orderBook[].price2_triggerfloatTrigger price for the second leg (if OCO).
orderBook[].product_typestringProduct type, e.g., "CNC", "MARGIN", "MTF".
orderBook[].qtyintQuantity for the first leg of the order.
orderBook[].qty2intQuantity for the second leg (if OCO).
orderBook[].report_typestringStatus of the order, e.g., "CANCELLED", "PLACED".
orderBook[].segmentintSegment code, e.g., 10 for equity.
orderBook[].symbolstringSymbol of the instrument, e.g., "NSE:CHOLAFIN-EQ".
orderBook[].symbol_descstring
  • Full description of the symbol,
  • e.g., "CHOLAMANDALAM IN & FIN CO".
orderBook[].symbol_exchstringSymbol short code on the exchange, e.g., "CHOLAFIN".
orderBook[].tick_sizefloatMinimum price increment for the instrument.
orderBook[].tran_sideintTransaction side: 1 for buy, -1 for sell.
orderBook[].gtt_oco_indint
  • Indicator for the order type:
  • 1: GTT order.
  • 2: OCO order.
orderBook[].create_timestringCreation timestamp of the order in human-readable format.
orderBook[].create_time_epochintCreation timestamp of the order in epoch seconds.
orderBook[].oms_msgstringMessage from the Order Management System (OMS) about the order's status.
orderBook[].ltp_chfloatLast traded price change.
orderBook[].ltp_chpfloatLast traded price change percentage.
orderBook[].ltpfloatLast traded price of the instrument.
Last updated on