instrument_history: Retrieve instrument history

Description Usage Arguments

Description

Get historical information on an instrument See the following link for further information: http://developer.oanda.com/rest-live/rates/#retrieveInstrumentHistory

Usage

1
2
3
4
instrument_history(oanda, instrument, granularity = NULL, count = NULL,
  start = NULL, end = NULL, candle_format = NULL, include_first = NULL,
  daily_alignment = NULL, alignment_timezone = NULL,
  weekly_alignment = NULL)

Arguments

oanda

OANDA class object generated by generate_oanda()

instrument

string. Name of the instrument to retrieve history for.

granularity

The time range represented by each candlestick. The value specified will determine the alignment of the first candlestick.

start

The start timestamp for the range of candles requested.

end

The end timestamp for the range of candles requested.

candle_format

Candlesticks representation (about candestick representation). This can be one of the following: "midpoint" - Midpoint based candlesticks. "bidask" - Bid/Ask based candlesticks The default for candleFormat is "bidask" if the candle_format parameter is not specified.

include_first

A boolean field which may be set to TRUE or FALSE. If it is set to TRUE, the candlestick covered by the start timestamp will be returned. If it is set to FASE, this candlestick will not be returned. This field exists so clients may easily ensure that they can poll for all candles more recent than their last received candle. The default for include_first is TRUE.

daily_alignment

The hour of day used to align candles with hourly, daily, weekly, or monthly granularity. The value specified is interpretted as an hour in the timezone set through the alignment_timezone parameter and must be an integer between 0 and 23. The default for daily_alignment is 17, which corresponds to 17:00 local time in New York.

alignment_timezone

The timezone to be used for the dailyAlignment parameter. This parameter does NOT affect the returned timestamp, the start or end parameters, these will always be in UTC. The timezone format used is defined by the IANA Time Zone Database, a full list of the timezones supported by the REST API can be found here. The default for alignmentTimezone is "America/New_York"

weekly_alignment

The day of the week used to align candles with weekly granularity. The value specified will be used as the start/end day when calculating the weekly candles. Valid values are: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday". The default for weekly_alignment is "Friday".

count:

The number of candles to return in the response. This parameter may be ignored by the server depending on the time range provided. If not specified, count will default to 500. The maximum acceptable value for count is 5000. count should not be specified if both the start and end parameters are also specified.


teramonagi/oandar documentation built on May 8, 2019, 8:51 a.m.