Our suite of application program interfaces (APIs) provides automated trading for forex, precious metals, and CFDs (contracts for difference) featuring commodities, indices, and bonds. Develop your trading strategies with our suite of APIs.

Build Successful Automated Trading Strategies

OANDA’s APIs are developed for corporations, brokers, hedge funds and money managers who require always-on, real-time trading capabilities. These powerful APIs can be used by investors hedging the exchange rate exposure of their equity positions. Manual traders can create customized user interfaces for OANDA's fxTrade platform, and algorithmic traders can develop proprietary trading models.

Perform Trading Actions

Execute trading actions such as market or limit orders, access your fxTrade account history, get streaming rates for forex, metals, CFDs, and more.

Dedicated Developer Portal

Our developer portal will help you get started. Extensive resources, code samples, and documentation are available at your fingertips.

Free to use

No extra fees are associated with OANDA’s API suite.*

* All we require is that you maintain sufficient funding in your OANDA account. 

How Do the APIs Work with the fxTrade Platform?

OANDA’s APIs allow your applications to communicate directly with OANDA’s fxTrade servers over secure and authenticated Internet sessions with fully encrypted communication channels.

The APIs do not require the fxTrade user interface to be up and running, although you can use it to monitor the real-time actions taken by the APIs.


Choose your preference


OANDA's new REST API with its language-agnostic implementation allows traders to pick their preferred programming languages with direct integration to the fxTrade platform. This API is ideal for individual traders who like to automate their trading strategies.

Learn more


OANDA's Java SDK (software development kit) encapsulates fast and reliable execution, wrapped around the core fxTrade platform. With knowledge of Java, any individual trader can start developing their trading applications. Check out some Java Samples here.

Learn more


Traders use MetaTrader 4 (MT4) for its charts, expert advisers (EAs), and customization features. OANDA on MT4 is a dynamic duo that provides the best of algorithmic trading plus the benefits of trading forex and CFDs with us.

Learn more


Financial institutions can use an encrypted Financial Information eXchange (FIX) channel to access the fxTrade platform. OANDA supports FIX 4.2 and 4.4.
Contact us at

Are You Ready to Get Started?

Sign Up

You need an fxTrade or fxTrade Practice account to use OANDA’s APIs.
Open an account

Your API Choice

Choose which API to build with based on your preferred programming language.
Pick Your API

Leveraged trading in Foreign Currency Contracts, precious metals, and CFDs may not be suitable for everybody as they are high risk products. We advise you to consider whether trading is appropriate for you in light of your experience, objectives, financial resources, risk tolerance and other relevant circumstances. Since you could lose some or all of your deposited funds, you should ensure you fully understand all of the risks. Promotions and claims only applicable to self-directed retail trading. Please refer to our more detailed risk warning:

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 to 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.

Trading FX and/or CFDs on margin is high risk and not suitable for everyone. Losses can exceed investment.