schwab_orderSearch | R Documentation |
Search for orders associated with a Schwab account over the previous 60 days. The result is a list of three objects:
jsonlite formatted extract of all orders
all entered orders with details
a data frame of all executed orders with the executions
schwab_orderSearch(
account_number,
startDate = Sys.Date() - 30,
endDate = Sys.Date(),
maxResults = 50,
orderStatus = "",
accessTokenList = NULL
)
account_number |
A Schwab account number associated with the Access Token |
startDate |
Orders from a certain date with. Format yyyy-mm-dd. |
endDate |
Filter orders that occurred before a certain date. Format yyyy-mm-dd |
maxResults |
the max results to return in the query |
orderStatus |
search by order status (ACCEPTED, FILLED, EXPIRED, CANCELED, REJECTED, etc). This can be left blank for all orders. See documentation for full list |
accessTokenList |
A valid Access Token must be set using the output from
|
a list of three objects: a jsonlite formatted extract of all orders, all entered orders with details, a data frame of all executed orders with the executions
## Not run:
# Get all orders run over the last 50 days (up to 500)
schwab_orderSearch(account_number = account_number,
startDate = Sys.Date()-50,
maxResults = 500, orderStatus = '')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.