Order

Modify order

This API allows you to modify an order. For modification orderId is mandatory. With orderId you need to send the optional parameter which needs to be modified. In case the optional parameters aren't sent, the default will be considered from the original order

put/v2/order/modify

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/order/modify
  • Auth: OAuth 2 (authorization code, authorization URL https://api-v2.upstox.com/v2/login/authorization/dialog, token URL https://api-v2.upstox.com/v2/login/authorization/token)

Request body

quantityinteger

Quantity with which the order was placed

validity'DAY' | 'IOC' required

Order validity (DAY- Day and IOC- Immediate or Cancel (IOC) order)

pricenumber float required

Price at which the order was placed

order_idstring required

The order ID for which the order must be modified

order_type'MARKET' | 'LIMIT' | 'SL' | 'SL-M' required

Type of order. It can be one of the following MARKET refers to market order LIMILT refers to Limit Order SL refers to Stop Loss Limit SL-M refers to Stop Loss Market

disclosed_quantityinteger

The quantity that should be disclosed in the market depth

trigger_pricenumber float required

If the order is a stop loss order then the trigger price to be set is mentioned here

Example request

{
  "quantity": 1,
  "validity": "DAY",
  "price": 120.01,
  "order_type": "MARKET"
}

Response

Successful

status'success' | 'error' | 'partial_success'

Changes

No recorded changes to this operation across all 1 revision of this API.