cancel_order: Function to cancel an exiting order.

View source: R/api_calls.R

cancel_orderR Documentation

Function to cancel an exiting order.

Description

Function to cancel an exiting order with specified ID.

Usage

cancel_order(object, orderid, variety)

Arguments

object

An object of type Smart connect.

orderid

Order ID for the order to modify.

variety

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

Details

This places a request to cancel an existing order, if it is not already executed. Please note: no error checks are done for the input parameters. Sanity check is left to the user of this function. 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.