Which API should I use?

  • Use v20 REST API only if you have a v20 account
  • Use v1 REST API if your account id contains only digits (ie. 2534253) as it is a legacy account

OANDA API Code Samples

What can I build?

OANDA is a leading forex broker enabling you to trade over 90 currency pairs, metals, and CFDs. Everything you ask for is live and real-time. The only limit is your imagination. If you have an idea for a product or company built on top of our platform we want to help! You could:

  • Write automated trading strategies in any programming language
  • Create a service that provides exchange rates for eCommerce companies
  • Start a business to hedge currency risks for other companies
  • Implement high frequency trading algorithms that make money while you sleep
  • Build a “Chart Chat” service that combines our chart data with the StockTwits API
  • Download Trading Account History to generate performance reports and trading analytics

Language API Wrappers.

Officially supported by OANDA

Sample Programs

OAuth Samples

Third-party Samples

OANDA does not provide support for any of the third party code samples on this site. Third-party code samples available on this site (the “Software”) is developed by third party providers (e.g OANDA API customers) separate from OANDA Corporation and its affiliated companies (“OANDA”). Any questions about the samples below should be forwarded to the maintainer of the repos.

Browse Github for more OANDA repos

OANDA makes no warranty or representation, either express or implied, with respect to the Software or Software features, including their quality, performance, merchantability, suitability, fitness for a particular purpose or that they are error free.