You can trade with Oanda™ either through the MT4 bridge, or with a direct API connection using the Oanda plugin. The API connection is preferable due to higher speed, lower spreads, and the ability to trade currencies with minimum volume, such as a single contract. Oanda is a 'market maker' broker with a large selection of index and commodity CFDs, free historical price data, a free API, no commission, no minimum monthly investment, no minimum lot size, and a simple margin and fee structure. Especially trading with minimum volume opens interesting possibilities, for instance running strategy tests on real Oanda accounts instead of demo accounts. Oanda is an affiliate broker of Zorro and supported with a free Zorro S subscription (not available in all countries).
For opening an Oanda demo account for API access, visit http://www.oanda.com, and select an fxTrader practice account. For opening a live account, use
the affiliate link of the
download page for claiming your free Zorro S subscription (details and conditions here). You will need an Access Token for trading through the API. For this, sign in on the Oanda website with your user name, then select Other Action / Manage API Access for getting your token. It's a long hexadecimal string that
serves as a password. Make sure to store it for later use. You will need to revoke your token and generate a new one when you create a sub-account.
The access token must be put into Zorro's password field for connecting to
||Oanda Account ID, or empty for using the default primary account
||Oanda Access Token
Oanda asset symbols
Currency names can be directly used for Oanda symbols, but most CFD names must be converted to a specific symbol in the asset list. An asset list AssetsOanda.csv with the main CFD symbols is included for this purpose. A list of available assets can be found at https://www.oanda.com/forex-trading/markets/live. Click on the asset to get its symbol name. Note that some assets are not available in all countries, f.i. no CFDs in the US.
The Oanda plugin supports the following additional data streams:
- marketVal: Bid/Ask spread in historical data.
- marketVol: Tick frequency in historical data.
Supported broker commands
The Oanda plugin supports the brokerCommand function with the following commands:
More commands, f.i. for retrieving order book data from Oanda's Forex Labs, can be implemented on user request.
- brokerCommand(SET_PATCH, patch)
Known Oanda API issues
The Oanda plugin uses the Oanda REST API. Compared with other broker APIs, the REST API is well structured, easy to implement, supports full trade management and allows unrestricted price history access. Known issues of the Oanda API are:
- Historical price data. Compared with FXCM, the Oanda price history is of slightly lower quality due to the reduced number of ticks (max. 24 per minute) and more small gaps. For both reasons T1 data from Oanda has a smaller file size than T1 data from FXCM. On the other hand, Oanda's price history loads faster than FXCM's, and goes further back. Oanda also supports more currency pairs than FXCM.
- Asset parameters. The Oanda V20 API does not return rollover rates, so they must be located on the Oanda website and manually entered in the asset list.
- Rate limit violation. Oanda is limited in the number of simultaneous connections and in the price retrieval rate. Do not trade more than one Zorro instance on any Oanda account. For trading several systems at the same time, use sub-accounts.
For reducing the number of requests per second, increase
- Compliance. Oanda accounts are NFA compliant. But Oanda works around most NFA issues on their side of the API, so the NFA flag needs not be set. Hedge however must be either at 0, 4, or 5 since long and short positions can not be open at the same time. Initial stops and partial closing are supported by the API.
- Shorthand Tickets. Oanda uses 64-bit trade tickets, which can be theoretically a 20-digit number. Zorro deals with them internally, but displays only the last 10 digits on the trade status page.
- Instrument trading halted. Trades can not be opened and closed outside trading hours. The trading hours of CFDs and currencies can be found on the Oanda website.
- Internal server error. Oanda servers occasionally go offline; during that time all API functions return a message that Oanda engineers are on their way to fix the problem.
This situation normally lasts only a few minutes.
- No hibernation. The PC must not be reset, restarted, switched off, hibernate, or go in suspend mode while connected to the Oanda API. Otherwise the API may crash and require a Zorro restart.
- API vs FxTrade. Parameters such as equity or trade
profit are updated by the Oanda API more frequently than by the FxTrade
platform. This led people to think that the API returns a different account
equity. Don't worry, a single account can have only one equity value, but
equity changes appear in the API lists and thus on the Zorro window much
faster than in the FxTrade platform.
Links, order, brokers, broker plugin,
MT4 bridge, IB bridge, FXCM plugin
► latest version online