Learn R Programming

moexer (version 0.2.0)

get_candles: Get Candles for a Set of Securities

Description

REST path: /engines/[engine]/markets/[market]/boards/[board]/securities/[security]/candles (see http://iss.moex.com/iss/reference/46).

Usage

get_candles(secid, from, till = NULL, interval = "monthly", ...)

Value

A tibble as with candles in HLOCV format, plus a column with the corresponding security ID.

Arguments

secid

A vector of security ID's.

from

A lubridate::date object or a character that can be coerced to it.

till

A lubridate::date object or a character that can be coerced to it.

interval

A character value specifying the candle duration (see moexer.candle.intervals option.)

...

Further arguments to query_iss.

Details

To get the engine-market-board path a separate get_security_info query is made and the board with is_primary = 1 is selected.

Examples

Run this code
if (FALSE) {
get_candles(
    secid = c('XXXX', 'SBER', 'FXGD'),
    from = '2020-01-01',
    debug = TRUE
)
}

Run the code above in your browser using DataLab