OANDA uses cookies to make our websites easy to use and customized to our visitors. Cookies cannot be used to identify you personally. By visiting our website you consent to OANDA’s use of cookies in accordance with our Privacy Policy. To block, delete or manage cookies, please visit aboutcookies.org. Restricting cookies will prevent you benefiting from some of the functionality of our website.
Access real-time trading capabilities and automate your forex, precious metals, CFD (contracts for difference) bonds, indicies and commodities† trading using REST and FIX application program interfaces (APIs)†.
Financial institutions can use an encrypted Financial Information eXchange (FIX) channel to access the OANDA Trade platform. OANDA supports FIX 4.2, 4.3, and 4.4.
OANDA's REST APIs are language-agnostic, allowing traders to pick their preferred programming languages to integrate directly to OANDA’s legacy and v20 trading engines. These APIs are ideal for individual traders who like to automate their trading strategies.
Yes. You need either an OANDA Live or Demo trading account to generate a personal access token and use the API. To generate a personal access token, log into the Access Management page of your OANDA fxTrade account. On the page, there is a link 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.
I forgot my personal access token. Can I retrieve it?
You will have to revoke and regenerate a new personal access token. Log onto the Access Management page of your OANDA fxTrade account. On the page, there is a link titled “Manage API Access” (My Account -> My Services -> Manage API Access). From there, you can revoke and regenerate a new personal access token to use with the OANDA API.
The REST APIs is programming language agnostic. You can use any one of your favourite programming languages to interface with our systems. Also, to make things easier, we have a number of programming language wrappers available on our OANDA Developer Portal.
Can I use OANDA’s APIs with v20?
You can use the REST-v20 API with your v20 account.
Are your communication channels fully encrypted?
Yes, all communication through the API is SSL protected.
Is there a charge to access the API?
API access is free with a sufficiently funded OANDA online trading account.
Does the API require an OANDA platform to be running?
The APIs do not require an OANDA trading platform to be running, although you can use it to monitor the real-time actions taken by the APIs.
I get HTTP 429 error when I make a REST API request?
You will need to revoke and regenerate a new person access token. Log onto the Access Management page of your OANDA fxTrade account. On the page, there is a link titled “Manage API Access” (My Account -> My Services -> Manage API Access). From there, you can revoke and regenerate a new personal access token to use with the OANDA API. Use this new token to make API requests.
I am using the v1 REST API, and it does not work with my account ?
If you have a v20 account (an account with “dashes” within the account Id, ie 101-23423-105), you will have to use the v3 (v20-REST) API.
I am using the v20 REST API, and it does not work with my account ?
If you have legacy account (an account without “dashes” within the account Id, ie. 252345), you will have to use the v1 API.
Where do I find OANDA’s registration forms, legal and trading documentation?
OANDA’s registration forms, legal and trading documentation vary based on the OANDA division with which you hold your account. Please check the relevant Legal & Regulatory Documentation section for more details.
This page is for general information purposes only: examples are not investment advice or an inducement to trade. Past history is not an indication of future performance.
Execution speed and numbers are based on the median round trip latency from receipt to response for all Market Order and Trade Close requests executed between January 1st and May 1st 2019 on the OANDA execution platform.
Contracts for Difference (CFDs) or Precious Metals are NOT available to residents of the United States.
The Commodity Futures Trading Commission (CFTC) limits leverage available to retail forex traders in the United States to 50:1 on major currency pairs and 20:1 for all others. OANDA Asia Pacific offers maximum leverage of 50:1 on FX products and limits to leverage offered on CFDs apply. Maximum leverage for OANDA Canada clients is determined by IIROC and is subject to change. For more information refer to our regulatory and financial compliance section.
OANDA’s APIs allow your applications to communicate directly with OANDA’s Trade servers over secure and authenticated Internet sessions with fully encrypted communication channels.
The APIs do not require the OANDA Trade user interface to be up and running, although you can use it to monitor the real-time actions taken by the APIs.
Your capital is at risk. Losses can exceed investment. Leverage trading is high risk and not for everyone.