Swap Rate SDK/API are available now

Ali Nuraldin
Opium
Published in
2 min readApr 23, 2020

We are excited to announce the release of JavaScript SDK built on top of Swap Rate API

What you can do with Swap Rate SDK/API

In our previous article, we explained exiting market-making opportunities on Interest Rate Swaps, and to help you to implement it, we released SDK and API.

The release not only gives the possibility for smooth implementation of market-making, trading, and hedging strategies with automated bots but also allows you to integrate interest rate swaps into existing projects. You can even build your own frontend for Interest Rate Swaps trading.

Our release includes

Use cases

You can run any strategy: automatic buying, selling, or market-making.

Let’s say we believe an effective APR on deposits in DAI on AAVE will not be higher than 3% during the next three months. Simply speaking, we want to go SHORT on AAVE’s DAI deposits effective APR for three months. (At this moment DAI’s deposits APR on AAVE is 2.88%)

To do so, we would want to pick up all the orders that offer us a fixed rate income of more than 3% on DAI deposits in July. Let’s see how easy it is to accomplish it with just a few lines code.

Example of trading bot implementation using SwapRate SDK

Example code

You can find an example source code of the bot in GitHub gist.

With this code, you can run the fully-functioning trading bot within minutes. But first, you will need to install the SDK library using NPM

npm i @opiumteam/swaprate-js

We wish that SDK and API will help your bots and trading strategies to be executed more efficiently, better, and faster.

If you still have any questions, please contact us in our Telegram chat or comment below!

Stay tuned,
Follow Opium.Team on Twitter.

--

--