stats: Trading stats

Description Usage Arguments Value References

View source: R/iex.R

Description

A set of functions that return trading statistics.

Usage

1
2
3
4
5
6
7
8
9
intraday_stats(fields = NULL, version = "1.0")

recent_stats(fields = NULL, version = "1.0")

records_stats(fields = NULL, version = "1.0")

monthly_stats(date = NULL, fields = NULL, version = "1.0")

daily_stats(date = NULL, last = NULL, fields = NULL, version = "1.0")

Arguments

fields

a vector of fields names to return (case sensitive). When set to NULL (default) returns values for all fields.

version

the API version number (default: "1.0") which is used to define the API URL.

date

should be a string of the format "YYYYMM" or "YYYYMMDD" which is a valid option for daily_stats() or NULL (default) which returns the prior trading date's data for daily_stats() and the prior month's trading data for monthly_stats()

last

can be used in place of date to retrieve the last n number of trading days' data. If this is supplied, any value supplied to date is ignored.

Value

an S3 object of class iex_api which has three accessible fields: path, response and content containing the API path, the unparsed API response and the parsed content from the API's response (the latter usually being a list). Note that this package causes R to pause 0.2 seconds after executing an API call to avoid the user being throttled by the API (which enforces a 5 request per second limit)

References

IEX stats API documentation


imanuelcostigan/iex documentation built on May 18, 2019, 4:44 a.m.