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


Sample Programs


OAuth Samples


Third-party Samples

  • Argo4 - Argo is an open source trading platform, based on HTML5 technology, connecting directly with OANDA through the powerful API to develop trading strategies. Maintained by albertosantini
  • (Third party) REST-V20 API wrapper - Python library for the v20 API. Maintained by feitebrekeveld

Browse Github for more OANDA repos

Any third-party code sample 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”). 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.