Automated Trading API's for Forex, Metals and CFDs

Develop trading strategies with OANDA’s fxTrade API

Use the OANDA fxTrade API to build secure, automated trading systems in the programming language of your choice.. You can programmatically perform trading actions such as the following:

  • Submit market or limit orders 
  • Create Stop-loss and take-profit orders
  • Access your account transaction history 
  • Access streaming and historical price quotes for Forex, Metals and CFDs
  • Develop and test your strategy on OANDA’s fxTrade Practice platform.

Available for Java, REST API and the FIX protocol.


  • Corporations, brokers, hedge funds and money managers requiring always-on, real-time trading capabilities
  • Companies integrating forex hedging into their treasury systems
  • Investors hedging the exchange rate exposure of their equity positions
  • Manual traders creating customized user interfaces to OANDA's fxTrade system
  • Algorithmic traders developing proprietary trading models.

The OANDA fxTrade system offers many benefits to traders active in the Currency, Metals, Commodities, Indices and Bond markets: tight spreads, instant settlement with full price transparency, flexible any-size trades, continuous interest and multi-currency accounts.

How fxTrade APIs Work

An API library implementing the fxTrade protocol allows your application to communicate directly with OANDA's fxTrade servers over secure, 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 the interface to monitor the real-time system actions taken by the API.


The OANDA fxTrade API is available in the following versions:

Java Docs Sample code
Rest API (New)  Find out more
FIX 4.2 and 4.4
Find out more

To use the fxTrade APIs, you must:

  • Enter into a license agreement with OANDA.
  • Maintain sufficient funding in your fxTrade account.
  • Have software development experience or access to programmers with the expertise to design and implement automated trading systems for you

OANDA has waived the license fee of USD $600. Registered OANDA customers can use our API free of charge for the purposes of trading in their personal account, subject to the terms and conditions. Partner or anybody who wishes to use the API for purposes other than for trading should contact OANDA via

The license is available to only one fxTrade account and its associated sub-accounts, as well as one fxTrade Practice account to be used for testing. Support is provided for one fxTrade API library only (but you can change this library if you need to).


  • Ensure your fxTrade account has a minimum balance of USD $2500 (no minimum balance required for your fxPractice account)
  • Review, complete in full and sign the API Legal Agreement. Please complete all of Schedule A.
  • Email a scanned copy to

Depending on the selected API, OANDA will either email you the API client library or send you instructions on how to receive an access token. OANDA will enable your fxTrade Practice test account for API access after we verify your account funds and agreement. We will enable your fxTrade account for API access after you implement and test your API programs.

Get More Information

Use the following form to contact OANDA.

Your email:
Loading nanoRep