oanda_orders | R Documentation |
Provides a summary of the aggregate orders posted by OANDA fxTrade clients at each price level.
oanda_orders(instrument, time, server, apikey)
instrument |
string containing the base currency and quote currency
delimited by '_' or '-' (e.g. "USD_JPY" or "usd-jpy"). Use the
|
time |
(optional) the time for which to retrieve the order book, in a
format convertible to POSIXct by |
server |
(optional) specify the "practice" or "live" server according to
the account type held. If not specified, will default to "practice",
unless this has been changed by |
apikey |
(optional) string containing the OANDA fxTrade API key
(personal access token), or function that returns this string. Does not
need to be specified if already stored as the environment variable
|
This feature has been implemented by OANDA only for certain major currency pairs and should be considered experimental.
Note: as certain orders are placed far from the market price, only the interquartile range of order levels is shown on the chart. The returned data frame does however contain the entire order book.
For further details please refer to the OANDA fxTrade API vignette by
calling: vignette("xoanda", package = "ichimoku")
.
Invisibly, a data frame of the order book with parameters saved as attributes. A chart showing the percentage long and short orders at each price level is output to the graphical device.
## Not run:
# OANDA fxTrade API key required to run this example
oanda_orders("USD_JPY")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.