Backend function called by place_order(), get_order_status(), cancel_order(). Issues a buy/sell order or returns the status of an order. When issuing a buy order use the url column in the return data to check the status or cancel the order.
api_orders_crypto(
RH,
action,
order_id = NULL,
cancel_url = NULL,
currency_pair_id = NULL,
type = NULL,
time_in_force = NULL,
price = NULL,
quantity = NULL,
side = NULL
)
object of class RobinHood
(string) one of "order", "status", "cancel", or "history"
(string) action is "status" or "cancel", only order_id is required
(string) url for posting a cancel order
(string) currency pair id
(string) "market" or "limit"
(string) Good For Day ("gfd"), Good Till Canceled ("gtc"), Immediate or Cancel ("ioc"), or Opening ("opg")
(number) the price you are willing to sell or buy at
(int) number of shares you wish to transact
(string) "buy" or "sell"