Learn R Programming

schwabr (version 0.1.3)

schwab_marketHours: Get Market Hours

Description

Returns a list output for current day and specified market that details the trading window

Usage

schwab_marketHours(
  marketType = c("EQUITY", "OPTION", "BOND", "FUTURE", "FOREX"),
  date = Sys.Date(),
  accessTokenList = NULL
)

Value

List output of times and if the current date is a trading day

Arguments

marketType

The asset class to pull: 'EQUITY','OPTION','BOND','FUTURE','FOREX'. Default is EQUITY

date

Current or future date to check hours

accessTokenList

A valid Access Token must be set using the output from schwab_auth3_accessToken. The most recent Access Token will be used by default unless one is manually passed into the function.

Examples

Run this code
if (FALSE) {

# Access Token must be set using schwab_auth3_accessToken
# Market hours for the current date
schwab_marketHours()
schwab_marketHours('2020-06-24', 'OPTION')

}

Run the code above in your browser using DataLab