modify_order: Function to modify an exiting order.

View source: R/api_calls.R

modify_orderR Documentation

Function to modify an exiting order.

Description

Function to modify an exiting order with specified details.

Usage

modify_order(object, param)

Arguments

object

An object of type smart connect.

variety

Order variety, e.g. regular, bo, co or amo.

orderid

Order ID for the order to modify.

ordertype

Order type, e.g. MARKET, LIMIT, SL or SL-M.

duration

Duration

producttype

Product type, e.g. MIS, NRML, CNC, BO or CO

price

New Price (e.g. for limit orders).

quantity

New quantity.

tradingsymbol

Trading Symbol of the instrument.

symboltoken

Symbol token

exchange

Exchange for the order, e.g. NSE, NFO, CDS etc.

Details

This function sends a modification request for an existing order, assuming it is not already executed. Please note: not all parameters are relevant for all types of orders. No error checks is carried out, It is left to the function calling this method to carry out necessary error checks.If successful, this will return the order ID (should be same as the one passed). A successfully placed request does not mean it is a valid order, and orders with erroneous user input can be immediately canceled. Therefore it is good practice to check the order details once an order ID is received from this call.

Value

Returns an order ID (string), if successful.


angelbroking-github/smartapi-r documentation built on March 30, 2022, 8:04 a.m.