async_v20: Asynchronous OANDA v20 client

A foreign exchange client
async-v20 logo Documentation Status


  • Losses can exceed investment.
  • async_v20 and its creator has no affiliation with OANDA. And is not endorsed by OANDA in any manner.
  • async_v20 is in Beta stage and has not been tested on a live OANDA account
  • Use at own risk


  • Exposes the entire v20 API `
  • immutable objects
  • No *args, **kwargs In client methods. So no guessing what arguments a method takes
  • Serialize objects directly into pandas Series or DataFrame objects
  • Construct concurrent trading algorithms


$ pip install async_v20

async_v20 is built with aiohttp. It is therefore recommended to also install cchardet and aiodns as per aiohttp documentation `

$ pip install cchardet

$ pip install aiodns

Why async_v20?

There are many OANDA clients for python already available so why create another? The main driver for creating async_v20 was to facilitate better risk management, by allowing user’s to concurrently monitor account status and trade currency’s.

An unintended consequence of async_v20 is the ability to create clear segregation between implementation ideas.

A simple example might contain a coroutine for the following:

  • Monitoring overall account status
  • Watching price stream and triggering buy/sell signals
  • Monitoring individual trades and closing movements against held positions

A synchronous implementation would require considerable effort to determine which task communicates with the server next. async_v20 removes this burden by using aiohttp

Further goals of async_v20 has been to lower the barrier of entry for algorithmic trading by providing a complete and simple to use interface.

Source code

Can be found on GitHub

Please feel free to file an issue on the bug tracker if you have found a bug or have some suggestion in order to improve the client.


  • python >= 3.6
  • aiohttp >= 2.2.5
  • ujson >= 1.35’
  • yarl >= 0.12.0’
  • pandas