modify_order: Function to modify an exiting order.

Description Usage Arguments Details Value See Also

View source: R/restful.R

Description

Function to modify an exiting order with specified details.

Usage

1
2
3
modify_order(object, variety, order_id, parent_order_id = NULL,
  quantity = NULL, price = NULL, order_type = NULL,
  trigger_price = NULL, validity = NULL, disclosed_quantity = 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).

quantity

New quantity.

price

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

order_type

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

trigger_price

Trigger price if required (e.g. for stop loss orders).

validity

Validity period of the order (DAY/IOC).

disclosed_quantity

Quantity to disclosed publicly.

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 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

cancel_order


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