SpreadsOanda: Spread information for a supported instrument

Description Usage Arguments Details Value Examples

View source: R/OandaForexLabs.R

Description

Returns up to 1 year worth of spread information for a supported instrument. The returned data is divided in 15 minute intervals. For each period, we provide the time weighted average, minimum, and maximum spread.

Usage

1
2
SpreadsOanda(ACCOUNT_TYPE, ACCESS_TOKEN, ACCOUNT_ID, INSTRUMENTS = "EUR_USD",
  PERIOD = "1 year")

Arguments

ACCOUNT_TYPE

"practice", "real" or "sandbox"

ACCESS_TOKEN

The authorization bearer token previously obtained by the client, can be found in oanda environment

ACCOUNT_ID

ID of the Account to create the Order for.

INSTRUMENTS

Instrument to get candlestick data for e.g. "AUD_USD"

PERIOD

Required Period of time to retrieve calendar data for.

Details

Period includes:
- 1 hour
- 12 hours
- 1 day
- 1 week
- 1 month
- 3 months
- 6 months
- 1 year

Value

A list

Examples

1
2
spreads = SpreadsOanda(.oandaEnv$ACCOUNT_TYPE, .oandaEnv$ACCESS_TOKEN, .oandaEnv$ACCOUNT_ID, INSTRUMENTS = 'AUD_USD', PERIOD = '1 year')
spreads

ivanliu1989/RQuantAPI documentation built on Sept. 13, 2019, 11:54 a.m.