tf_as_duration: tf_as_duration

View source: R/internal.R

tf_as_durationR Documentation

tf_as_duration

Description

convert quarter timeframe to duration

Usage

tf_as_duration(multiplier, timeframe)

Arguments

multiplier

For the v1 API, with 'minute' timeframe one of 1/5/15. Otherwise, defaults to 1. For the v2 API, multiplier can only be 1. For the "polygon" API, this can be any positive integer. Default 1.

timeframe

(character) For the v1 API, one of

  • 'tr'/'lt'/'trade'/'last_trade' For the last trade price. See Last Trade

  • 'qu'/'lq'/'quote'/'last_quote' For the last quote price. See Last Quote

  • 'm'/'min'`/`'minute' (multiplier can be 1/5/15)

  • 'd'/'day' (multiplier will be 1)

For the v2 IEX/SIP API the following timeframes are supported:

For the "p"/"polygon" API, multiplier can be any positive integer for any one of the following timeframe's:

  • 'm'/'min'/'minute'

  • 'h'/'hour'

  • 'd'/'day'

  • 'w'/'week'

  • 'M'/'mo'/'month' (Note capitalize M for month)

  • 'q'/'quarter'

  • 'y'/'year'


jagg19/AlpacaforR documentation built on July 3, 2023, 12:14 p.m.