Description Usage Arguments Value Examples
View source: R/OandaInstrument.R
Fetch Candlestick Data for an Instrument from Oanda
1 2 | getOandaInstrumentCandles(ACCOUNT_TYPE, ACCESS_TOKEN, INSTRUMENTS = "AUD_USD",
count = 500, price = "BA", granularity = "S5", ...)
|
ACCOUNT_TYPE |
"practice", "real" or "sandbox" |
ACCESS_TOKEN |
The authorization bearer token previously obtained by the client, can be found in oanda environment |
INSTRUMENTS |
Instrument to get candlestick data for e.g. "AUD_USD" |
count |
The number of candlesticks to return in the reponse. Count should not be specified if both the start and end parameters are provided |
price |
The Price component(s) to get candlestick data for. Can contain any combination of the characters “M” (midpoint candles) “B” (bid candles) and “A” (ask candles). [default=M] |
granularity |
The granularity of the candlesticks to fetch [default=S5] |
A data.frame
of candlesticks
1 | dat = getOandaInstrumentCandles(.oandaEnv$ACCOUNT_TYPE, .oandaEnv$ACCESS_TOKEN, INSTRUMENTS = 'AUD_USD', price = 'BA', granularity = 'M5', count = 500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.