Skip to content

Modify Order

Use this page to modify one existing Trading API V3 order ID through the REST API.

This same endpoint is used for:

  • one single-instrument order
  • one item originally placed inside a multi-order request
  • one strategy order

For strategy orders created with isMultiLeg: true, use the strategy-level intentOrderId returned by placement. Do not use basketId, and do not resend legs or isMultiLeg in the modify payload.

Basic Usage

{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "CNC",
      "priceType": "LIMIT",
      "entryPrice": 1420,
      "validityType": "DAY",
      "executionMode": "ENTRY",
      "echoFields": "{\"omsType\":\"SINGLE\",\"orderType\":\"REGULAR\",\"displayName\":\"Custom Basket\"}"
    }
  ]
}

Use the payload as an order-level patch request. Send only the fields you want to change, but keep the field names and nesting exactly aligned to the create-order shape for the same order family.

Order Type Scope

Use this page when modifying exactly one Trading API V3 intentOrderId.

The REST body still uses an orders array, but the array should contain exactly one modify item.

Example Modify Patterns

  • pass the target Trading API V3 order ID as orderId
  • keep the request object scoped to the fields being changed
  • use entryConfig for entry trigger or timed-entry changes
  • use exitConfig for stop-loss, target, trailing stop-loss, or timed-exit changes
  • for strategy orders, use qty as the updated common executable base quantity
  • do not resend legs or isMultiLeg when modifying an already-created strategy order
{
  "orders": [
    {
      "orderId": 10003,
      "qty": 1,
      "deliveryType": "IDAY",
      "priceType": "LIMIT",
      "entryPrice": 127500,
      "validityType": "DAY",
      "executionMode": "ENTRY"
    }
  ]
}
{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "IDAY",
      "priceType": "LIMIT",
      "entryPrice": 127000,
      "validityType": "DAY",
      "executionMode": "ENTRY",
      "entryConfig": {
        "triggers": {
          "ltp": {
            "atOrAbove": { "value": 127000 }
          }
        }
      }
    }
  ]
}
{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "IDAY",
      "priceType": "LIMIT",
      "entryPrice": 127000,
      "validityType": "DAY",
      "executionMode": "ENTRY_AND_EXIT",
      "exitConfig": {
        "stoplossParams": {
          "stoplossTriggerPrice": { "value": 126500 },
          "stoplossLimitPrice": { "value": 126400 }
        },
        "targetParams": {
          "targetProfitTriggerPrice": { "value": 127500 },
          "targetProfitLimitPrice": { "value": 127400 }
        }
      }
    }
  ]
}
{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "IDAY",
      "priceType": "LIMIT",
      "entryPrice": 127000,
      "validityType": "DAY",
      "executionMode": "ENTRY_AND_EXIT",
      "exitConfig": {
        "stoplossParams": {
          "stoplossTriggerPrice": { "value": 126500 },
          "stoplossLimitPrice": { "value": 126400 },
          "stoplossTrailJump": 5
        }
      }
    }
  ]
}
{
  "orders": [
    {
      "orderId": 10003,
      "qty": 65,
      "deliveryType": "CNC",
      "priceType": "LIMIT",
      "entryPrice": 44935,
      "validityType": "DAY",
      "executionMode": "ENTRY"
    }
  ]
}

Timed Entry / Exit

Use entryConfig.entryTime to adjust scheduled entry behavior and exitConfig.exitTime to adjust scheduled exit behavior.

{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "IDAY",
      "priceType": "LIMIT",
      "entryPrice": 127000,
      "validityType": "DAY",
      "executionMode": "ENTRY",
      "entryConfig": {
        "entryTime": "2026-06-17T09:20:00Z"
      },
      "exitConfig": {
        "exitTime": "2026-06-17T09:25:00Z"
      }
    }
  ]
}

GTE Modifications

For good-till orders, keep validityType: "GTE" and send the new goodTillDate.

{
  "orders": [
    {
      "orderId": 10003,
      "deliveryType": "CNC",
      "priceType": "LIMIT",
      "entryPrice": 127000,
      "validityType": "GTE",
      "goodTillDate": "2026-10-31T15:10:00Z",
      "executionMode": "ENTRY"
    }
  ]
}

Execution Modes

Value Use
ENTRY Entry-only modify
ENTRY_AND_EXIT Modify payload that also changes managed exits
EXIT Exit-only modify flow

Request Fields

Field Type Required Description
orders array Yes Wrapper for one or more modify requests
orders[].orderId int Yes Intent order id to modify
orders[].qty int Conditional Updated quantity. For strategy orders, use the updated common executable base quantity
orders[].deliveryType enum Yes Updated delivery type
orders[].priceType enum Yes Updated price type
orders[].entryPrice int Conditional Updated limit price
orders[].validityType enum Yes Updated validity type
orders[].executionMode enum Yes Updated execution mode
orders[].goodTillDate string Conditional Updated expiry time for GTE orders
orders[].entryConfig object Conditional Updated entry trigger or entry time
orders[].exitConfig object Conditional Updated stop-loss, target, trailing, or exit time
orders[].echoFields string Optional Client metadata echoed through the OMS flow

Condition Fields

Field Type Description
entryConfig.triggers.* object Updated entry trigger controls
entryConfig.entryTime string Updated timed entry
exitConfig.stoplossParams.* object Updated stop-loss controls
exitConfig.targetParams.* object Updated target controls
exitConfig.exitTime string Updated timed exit

Response Fields

The modify endpoint returns an acknowledgement:

{
  "message": "order modify request pushed successfully"
}

Important Rules

  • Treat the modify response as an acknowledgement only.
  • A 200 response means the modify request was accepted by the system, not that the exchange-side state has already changed.
  • To confirm whether a modify actually took effect, call GET sentinel/orders, find the target intentOrderId, and compare orderPrice, status, and timestamps.lastModifiedAt.
  • If the target order is already executed, cancelled, or still being processed by the exchange, the modify may be ignored or rejected even when the payload shape is otherwise correct.
  • For target exits, keep targetProfitTriggerPrice greater than or equal to targetProfitLimitPrice.
NEO Assistant