- 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
npm install @oanda/v20
- Python - OANDA v20 bindings for Python or via PyPI
pip install v20
- Java - OANDA v20 bindings for Java
- Python sample programs using the OANDA v20 Python wrapper
- Java sample programs using the OANDA v20 Java wrapper
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.
- 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 Python API wrapper - Python library for the v20 API. Maintained by feitebrekeveld
- (Third party) REST-V20 C# API wrapper - C# library for the v20 API. Maintained by mrchrisok
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.