View source: R/cancel_order_options.R
cancel_order_options | R Documentation |
Send a cancel signal for a particular order to RobinHood. You will need to retain the buy/sell order url returned from place_order_options().
cancel_order_options(RH, cancel_url)
RH |
object of class RobinHood |
cancel_url |
(string) cancel url returned from place_order() |
## Not run: # Login in to your RobinHood account RH <- RobinHood("username", "password") # Place an order, should generate an email confirmation x <- place_order_options(RH = RH, option_id = "346e46af-380e-4052-a7c2-15748f0fc0ca", direction = "debit", # one of "debit" or "credit" side = "buy", # one of "buy" or "sell" quantity = 1, # number of contracts stop_price = .01, # Time period (gfd: good for day) type = "limit", # limit or market (only limit is currently supported) time_in_force = "gtc") # "gfd", "gtc", "ioc", "opg" # Cancel the order, should also generate an email confirmation cancel_order_options(RH, x$cancel_url) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.