Edit an order that has been placed.

edit_order(
  orderID = NULL,
  origClOrdID = NULL,
  clOrdID = NULL,
  orderQty = NULL,
  leavesQty = NULL,
  price = NULL,
  stopPx = NULL,
  pegOffsetValue = NULL,
  text = NULL
)

Arguments

orderID

string. Order ID.

origClOrdID

string. The original client order ID

clOrdID

string. Optional new client order ID.

orderQty

double. Order quantity in units of the instrument (i.e. contracts).

leavesQty

string. Optional leaves quantity in units of the instrument (i.e. contracts). Useful for amending partially filled orders.

price

double. Optional limit price for 'Limit', 'StopLimit', and 'LimitIfTouched' orders.

stopPx

double. Optional trigger price for 'Stop', 'StopLimit', 'MarketIfTouched', and 'LimitIfTouched' orders. Use a price below the current price for stop-sell orders and buy-if-touched orders. Use execInst of 'MarkPrice' or 'LastPrice' to define the current price used for triggering.

pegOffsetValue

string. Optional trailing offset from the current price for 'Stop', 'StopLimit', ' MarketIfTouched', and 'LimitIfTouched' orders; use a negative offset for stop-sell orders and buy-if-touched orders. Optional offset from the peg price for 'Pegged' orders.

text

string. Optional amend annotation. e.g. 'Adjust skew'.

Value

A data.frame with information about the amended order. See https://www.bitmex.com/api/explorer/#!/Order/Order_amend for more information.

Examples

if (FALSE) { # place an order place_order(symbol = "XBTUSD", price = 5000, orderQty = 100, clOrdID = "myorderid") # edit the order edit_order(origClOrID = "myorderid", orderQty = 200) }