Description Usage Arguments Value Examples
Get a list of tradeable instruments (currency pairs, CFDs, and commodities) that are available for trading with the account specified.
1 2 | instrument_list(token, accountId, fields = NULL, instruments = NULL,
accountType = c("Trade", "Practice"))
|
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. |
accountId |
The account id to fetch the list of tradeable instruments for. Can be retrieved with a call of |
fields |
A vector of instrument fields that are to be returned in the response. Please see the Value section below for a list of valid values. If the fields option is not specified, all fields will be returned |
instruments |
A vector of instruments that are to be returned in the response. If the instruments option is not specified, all instruments will be returned |
accountType |
The subdomain for the request is dependent on the environment you wish to obtain access tokens for. Possible choices are Practice or Trade |
A data frame with all or some of the following fields:
instrument: Name of the instrument. This value should be used to fetch prices and create orders and trades.
displayName: Display name for the end user.
pip: Value of 1 pip for the instrument. More on pip.
maxTradeUnits: The maximum number of units that can be traded for the instrument.
precision: The smallest unit of measurement to express the change in value between the instrument pair.
maxTrailingStop: The maximum trailing stop value (in pips) that can be set when trading the instrument.
minTrailingStop: The minimum trailing stop value (in pips) that can be set when trading the instrument.
marginRate: The margin requirement for the instrument. A 3% margin rate will be represented as 0.03.
halted: The current trading status of the instrument. True if trading is halted, false if trading is active.
1 | instrument_list('my_token_1234', 'my_account_1234', 'Practice', c('pip', 'precision'), c('AUD_CAD', 'AUD_CHF'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.