Skip to Content

Modify GTT Order

This API allows you to modify the price, trigger price or quantity of a pending GTT order.

USE CASE

Move your target or stop-loss after placing a GTT order, without cancelling it and placing a new one.

Details

  • This allows the user to modify pending GTT orders. Users can provide parameters which need to be modified. In case a particular parameter has not been provided, the original value will be considered.
  • Send the order id and orderInfo. leg1 is mandatory for every modification, and leg2 is required if the order is an OCO.
  • Only the price, trigger price and quantity of each leg can be updated. The request has no field for symbol, side or product type.
  • For an OCO order, the leg1 trigger price must stay above LTP and the leg2 trigger price must stay below LTP.
  • Response code 1102 means the order was modified. Code 201 means it is in transit, so confirm it in the GTT Order Book.
  • Rate limits differ between the Standard and Prime plans. See Plans & rate limits.

Request Attributes

AttributeData TypeDescription
id*stringUnique identifier for the order to be modified, e.g., "25010700000001".
orderInfo*objectContains updated information about the GTT/OCO order legs.
orderInfo.leg1*objectDetails for GTT order leg. Mandatory for all modifications.
orderInfo.leg1.price*floatUpdated price at which the order should be placed.
orderInfo.leg1.triggerPrice*floatUpdated trigger price for the GTT order. NOTE: for OCO order this leg trigger price should be always above LTP.
orderInfo.leg1.qty*intUpdated quantity for the GTT order leg.
orderInfo.leg2*objectDetails for OCO order leg. Required if the order is an OCO type.
orderInfo.leg2.price*floatUpdated price for the second leg of the OCO order.
orderInfo.leg2.triggerPrice*float
  • Updated trigger price for the second leg of the OCO order.
  • NOTE: for OCO order this leg trigger price should be always below LTP.
orderInfo.leg2.qty*intUpdated quantity for the second leg of the OCO order.

Response Attributes

AttributeData TypeDescription
sstringok / error
codeint
  • Status code indicating the outcome of the modification request:
  • 1102: Order modification successful.
  • 201: Order modification is in transit. Confirm details using the Orderbook API.
  • Other codes represent specific error conditions.
messagestring
  • Descriptive message about the modification request.
  • e.g., "Successfully modified order".
idstringUnique identifier for the modified order, returned if the modification is successful.
Last updated on