cancel_order: Function to cancel an exiting order.

Description Usage Arguments Details Value See Also

View source: R/restful.R

Description

Function to cancel an exiting order with specified ID.

Usage

1
cancel_order(object, variety, order_id, parent_order_id = NULL)

Arguments

object

An object of type kite connect with valid api_key and access_token.

variety

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

order_id

Order ID for the order to modify.

parent_order_id

Required for bracket orders (cannot be modified).

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 immedeately cancelled. 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.

See Also

order_history

place_order

modify_order


prodipta/kiteconnect3 documentation built on Sept. 24, 2020, 8:30 a.m.