tops: Top of book data (TOPS)

Description Usage Arguments Value References Examples

View source: R/iex.R

Description

Provides IEX's aggregated bid and offer position in near real time for all securities on IEX's displayed limit order book.

Usage

1
tops(symbols = NULL, fields = NULL, version = "1.0")

Arguments

symbols

a vector of tickers (case insensitive). Special characters will be escaped. A list of eligible symbols is published daily by the IEX. When set to NULL (default) returns values for all symbols.

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.

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 API TOPS documentation

Examples

1
2
3
4
5
6
7
## Not run: 
tops(
  symbols = c("AAPL", "FB"),
  fields  = c("symbol", "bidSize", "bidPrice", "askSize", "askPrice")
)

## End(Not run)

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