Skip to content

Modify Order

The Modify Order API allows you to adjust the price, quantity, order type, or validity of an existing pending order without canceling it.

Usage

    from nubra_python_sdk.trading.trading_data import NubraTrader
    from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv

    # Initialize the Nubra SDK client
    # Use NubraEnv.UAT for testing or NubraEnv.PROD for production
    nubra = InitNubraSdk(NubraEnv.UAT)  # or NubraEnv.PROD

    ##using totp login and .env file 
    #nubra = InitNubraSdk(NubraEnv.UAT, totp_login= True ,env_creds = True)

    trade = NubraTrader(nubra, version= "V1")

    trade.modify_order(order_id=999, order_qty=1, order_price=130000)

Request Parameters

Field Type Description
order_id int ID of the order to modify
order_qty int Updated quantity
order_price int Updated price (in paise)
trigger_price int Price at which the order should be triggered (in paise)

Execution Type Requirements

Execution Type Modification Allowed Example
STRATEGY_TYPE_LIMIT order_price, order_qty trade.modify_order(order_id=999, order_qty=1, order_price=1300)
STRATEGY_TYPE_IOC order_price, order_qty trade.modify_order(order_id=999, order_qty=1, order_price=1300)
STRATEGY_TYPE_ICEBERG order_price, order_qty trade.modify_order(order_id=999, order_qty=1, order_price=1300)
STRATEGY_TYPE_STOPLOSS order_price, order_qty, trigger_price trade.modify_order(order_id=999, order_qty=1, order_price=1300, trigger_price=)

Response Structure

    # Success Response
    {
        'message': 'update request pushed'
    }