api_orders_crypto: RobinHood API: Orders Crypto

View source: R/api_orders_crypto.R

api_orders_cryptoR Documentation

RobinHood API: Orders Crypto

Description

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.

Usage

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
)

Arguments

RH

object of class RobinHood

action

(string) one of "order", "status", "cancel", or "history"

order_id

(string) action is "status" or "cancel", only order_id is required

cancel_url

(string) url for posting a cancel order

currency_pair_id

(string) currency pair id

type

(string) "market" or "limit"

time_in_force

(string) Good For Day ("gfd"), Good Till Canceled ("gtc"), Immediate or Cancel ("ioc"), or Opening ("opg")

price

(number) the price you are willing to sell or buy at

quantity

(int) number of shares you wish to transact

side

(string) "buy" or "sell"


RobinHood documentation built on Jan. 7, 2023, 1:11 a.m.