Skip to Content
API ReferenceTradingTrade BookGet Trades by Order Tag

Get Trades by Order Tag

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

USE CASE

Review the fills of a single 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:. Trades without a tag show 1: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 trade fields as Get Trades, such as tradePrice, tradedQty and orderNumber.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Response Attributes

AttributeData TypeDescription
symbolstringTrading symbol of the instrument, e.g. NSE:SBIN-EQ
rowintUnique value used to sort the trades
orderDateTimestringTime the trade occurred, in DD-MMM-YYYY hh:mm:ss format (IST)
orderNumberstringThe order ID for which the trade occurred
exchangeOrderNostringThe order number provided by the exchange
tradeNumberstringThe trade number generated by the exchange
tradePricefloatThe traded price
tradeValuefloatThe total traded value
tradedQtyintThe total traded quantity
orderTypeintThe type of order that generated the trade (e.g. Limit, Market)
sideint
  • 1 => Buy
  • -1 => Sell
productTypestringThe product type in which the order was placed, e.g. CNC or INTRADAY
segmentintThe segment in which the order was placed
exchangeintThe exchange in which the order was placed
fyTokenstringFytoken — a unique identifier for the symbol
clientIdstringThe FYERS client ID of the account the trade belongs to
orderTagstringThe order tag matched by the order_tag filter; a 1: prefix denotes a user-supplied tag and a 2: prefix denotes a tag generated internally by FYERS (default is 1:Untagged)
Last updated on