get_order_status_options: Get a current status of an option order on RobinHood

Description Usage Arguments Examples

View source: R/get_order_status_options.R

Description

Returns a list of order information given a buy/sell order url returned from place_order_options().

Usage

1
get_order_status_options(RH, status_url)

Arguments

RH

object of class RobinHood

status_url

(string) url of order returned from place_order

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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"

get_order_status_options(RH, x$status_url)

## End(Not run)

RobinHood documentation built on March 1, 2021, 5:08 p.m.