Skip to Content
API ReferenceTradingOrder BookGet Orders by Order Tag

Get Orders by Order Tag

This API allows you to fetch the orders placed with a specific order tag.

USE CASE

List only the orders placed by one strategy, using its order tag.

Details

  • You can query for a particular orderTag by passing the orderTag in the get parameters
  • Pass the tag in the GET parameters. The sample request uses order_tag=1:Ordertag, which includes the 1: prefix.
  • A tag you set when placing an order is stored with 1: in front; tags generated by FYERS get 2:. Orders without a tag show 2:Untagged.
  • Tag rules at order placement: letters and digits only (no spaces or special characters), 1 to 30 characters, and it cannot be your client ID or Untagged.
  • The response uses the same orderBook fields as Get Orders, including status, filledQty and tradedPrice.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Response Attributes - For each order in orderBook

AttributeData TypeDescription
clientIdstringThe client id of the fyers user
idstringThe unique order id assigned for each order
exchOrdIdstringThe order id provided by the exchange
qtyintThe original order qty
remainingQuantityintThe remaining qty
filledQtyintThe filled qty after partial trades
discloseQtyintDisclosed quantity
limitPricefloatThe limit price for the order
stopPricefloatThe stop price for the order
tradedPricefloatThe average traded price for the order
typeint
  • The order type, e.g.
  • 1 => Limit Order
  • 2 => Market Order
  • 3 => Stop Order (SL-M)
  • 4 => Stoplimit Order (SL-L)
fyTokenstringFytoken is a unique identifier for every symbol
exchangeintThe exchange in which the order is placed
segmentint
  • The segment in which the order is placed, e.g.
  • 10 => Equity
  • 11 => F&O
  • 12 => Currency
  • 20 => Commodity
symbolstringThe symbol for which the order is placed. Eg: NSE:IDEA-EQ
instrumentintExchange instrument type
messagestringThe error messages are shown here
offlineOrderbooleanFalse when market is open, True when placed as an AMO order
orderDateTimestringThe order time as per DD-MMM-YYYY hh:mm:ss in IST
orderValiditystringDAY or IOC
panstringPAN of the client
productTypestringThe product type of the order, e.g. CNC
sideint
  • The order side, e.g.
  • 1 => Buy
  • -1 => Sell
statusintThe order status code, e.g. 2 => Traded / Filled
sourcestringSource from where the order was placed, e.g. W (Web)
ex_symstringThe short exchange symbol/ticker name, e.g. IDEA
descriptionstringThe full descriptive name of the traded instrument
chfloatThe absolute change in the last traded price
chpfloatThe percentage change in the last traded price
lpfloatThe last traded price (LTP) of the symbol
slNointUsed to sort the orders based on the time
dqQtyRemintThe remaining disclosed quantity
orderNumStatusstringConcatenation of the order id and status code, e.g. 23030900015105:2
disclosedQtyintDisclosed quantity
orderTagstringThe order tag provided when placing the order, prefixed with 1: for user-provided tags or 2: for internally generated tags
takeProfitfloatTake profit price for the order
stopLossfloatStop loss price for the order
Last updated on