Swap Rate SDK/API are available now

Ali Nuraldin
Apr 23, 2020 · 2 min read

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.

Opium Team

Opium Protocol is the universal protocol to create, settle…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store