current_prices: Get current prices

Description Usage Arguments Value Examples

Description

Fetch live prices for specified instruments that are available on the OANDA platform.

Usage

1
current_prices(token, instruments, accountType = c("Trade", "Practice"))

Arguments

token

The personal access token. There is a link on your OANDA fxTrade account profile page titled 'Manage API Access' (My Account -> My Services -> Manage API Access). From there, you can generate a personal access token to use with the OANDA API, as well as revoke a token you may currently have.

instruments

A vector of instruments to fetch prices for. Values should be one of the available instrument from the instrument_list response.

accountType

The subdomain for the request is dependent on the environment you wish to obtain access tokens for. Possible choices are Practice or Trade

Value

A data frame with time, bid and ask for all the instruments specified.

Examples

1
current_prices('my_token_1234', c('EUR_USD', 'USD_JPY'))

RossiLorenzo/oandaR documentation built on May 9, 2019, 10:32 a.m.