bars_span: memorize the span of data that the API returns each time

bars_spanR Documentation

memorize the span of data that the API returns each time

Description

memorize the span of data that the API returns each time

Usage

bars_span(x, ext, timeframe)

Arguments

x

(tsymble) returned from API call

ext

(environment) with cyclically modified variables in bars_complete

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'

Value

(interval) of the time span returned by the API. Saved to the ext environment.


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