Skip to content

ModifyOrder ​

Modify an existing open order. You can change price, quantity, trigger price, and other parameters.

Endpoint URL ​

http
Local Host   :  POST http://127.0.0.1:5000/api/v1/modifyorder
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/modifyorder
Custom Domain:  POST https://<your-custom-domain>/api/v1/modifyorder

Sample API Request ​

json
{
  "apikey": "<your_app_apikey>",
  "orderid": "250408001002736",
  "strategy": "Python",
  "symbol": "YESBANK",
  "action": "BUY",
  "exchange": "NSE",
  "pricetype": "LIMIT",
  "product": "CNC",
  "quantity": 1,
  "price": 16.5,
  "trigger_price": 0,
  "disclosed_quantity": 0
}

Sample cURL Request ​

bash
curl -X POST http://127.0.0.1:5000/api/v1/modifyorder \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>",
  "orderid": "250408001002736",
  "strategy": "Python",
  "symbol": "YESBANK",
  "action": "BUY",
  "exchange": "NSE",
  "pricetype": "LIMIT",
  "product": "CNC",
  "quantity": 1,
  "price": 16.5,
  "trigger_price": 0,
  "disclosed_quantity": 0
}'

Sample API Response ​

json
{
  "orderid": "250408001002736",
  "status": "success"
}

Request Body ​

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-
orderidOrder ID to modifyMandatory-
strategyStrategy identifierMandatory-
symbolTrading symbolMandatory-
actionOrder action: BUY or SELLMandatory-
exchangeAny value in the shared VALID_EXCHANGES listMandatory-
pricetypePrice type: MARKET, LIMIT, SL, SL-MMandatory-
productProduct type: MIS, CNC, NRMLMandatory-
quantityNew order quantityMandatory-
priceNew order priceMandatory-
trigger_priceNew trigger price; send 0 when unusedMandatory-
disclosed_quantityNew disclosed quantity; send 0 when unusedMandatory-

All twelve fields are required by ModifyOrderSchema, with no defaults, and any other field returns HTTP 400. There is no partial modify: build the full body from the order's current values and change only what you need.

Response Fields ​

FieldTypeDescription
statusstring"success" or "error"
orderidstringModified order ID
messagestringError message (on failure)
modestring"analyze" in analyzer mode. The key is absent in live mode; there is no "mode": "live"

What Can Be Modified? ​

ParameterModifiableNotes
QuantityYesMust be valid lot size for F&O
PriceYesFor LIMIT/SL orders
Trigger PriceYesFor SL/SL-M orders
Price TypeVariesDepends on broker support
ProductNoCannot change MIS to CNC etc.
SymbolNoCannot change symbol
ActionNoCannot change BUY to SELL

Notes ​

  • Only open/pending orders can be modified
  • Completed, cancelled, or rejected orders cannot be modified
  • Some brokers may have restrictions on modification frequency
  • The order must be in a modifiable state (not in transit)
  • If you need to change action (BUY/SELL), cancel and place a new order
  • For F&O orders, ensure the modified quantity is a valid lot size
  • Fractional quantities are accepted only for CRYPTO; non-crypto quantities must be whole numbers.
  • strategy, trigger_price, and disclosed_quantity are schema-required even when the broker does not use their values for the requested modification.

Error Scenarios ​

ErrorCause
Order not foundInvalid order ID
Order not modifiableOrder already executed/cancelled
Invalid pricePrice out of circuit limits
Invalid quantityNot a valid lot size for F&O

Back to: API Documentation