← Go Back
Integration

Blankly is Now Integrated with KuCoin

We're excited to announce the availability of the KuCoin exchange integration with the Blankly Framework, making it easier for our users to use a wide range of exchanges in conjunction with our services.


img

We're excited to announce the availability of the KuCoin exchange integration with the Blankly Framework, making it easier for our users to use a wide range of exchanges in conjunction with our services. KuCoin is a highly secure cryptocurrency enabling its users to buy, sell, and store a wide range of cryptocurrencies. It also offers promising altcoins that can't be found on other exchanges.

Furthermore, we are thrilled to see how our users will utilize this new integration with their existing portfolios as KuCoin offers a robust range of functionality. We are also working towards incorporating other exchanges in the coming days as we aim to become an inclusive platform for all exchanges where our users would need to use only one codebase to run models on all exchanges.

For customers who want a historical view of certain aspects of a coin will be able to leverage our candle endpoints. The data can also be extracted down to the exact second or in an aggregated manner through user-defined intervals (e.g. 1 hour, 24 hours, etc.).

Awesome, Now How Do You Get Started?

In order for the exchange to work flawlessly, you're going to require two sets of keys: the Sandbox Keys and the Live Keys.

KuCoin Sandbox

  1. Head over to the KuCoin Sandbox website and sign up for an account. This allows you to access all of Blankly's Paper Trade features (such as backtesting Blankly.Strategy in one line).
  2. After your account has been set up, head over to API Management which can be found when you over your user profile in the top right. Go ahead and fill out the necessary details to create your Sandbox keys. Note the information in a safe place, it will be used shortly.
Kucoin Live Keys API Management

KuCoin Live Keys

In order to have access to live data feeds and not messy and noisy sandbox data, it's best to utilize live keys specifically with data permissions to have access to real-time KuCoin exchange data. By using these two sets of keys, we ensure that your backtests are fully up-to-date while also allowing seamless transition to trade live using your live keys.

  1. Now, go to the KuCoin website and follow the same procedure mentioned earlier. After you have acquired both sets of keys (ensuring data permissions are also given).

Integrating with Blankly

Initializing Your Directory

If you already have a directory set up wtih Blankly (i.e. with a keys.json, a settings.json and a blankly.json) with your own trading bot, you can skip this step. If you haven't set up a directory yet, simply run:

$ blankly init

to initialize the directory and all of its files.

Note, if you're wondering what is going on, definitely take a look at our Getting Started Video.

Then, simply update the keys.json to include your keys (and feel free to update the key names as needed).

"kucoin": {
        "KC Sandbox portfolio": {
            "API_KEY": "************************",
            "API_SECRET": "************************************",
            "API_PASS": "*********************"
        },
        "KC Live Keys": {
            "API_KEY": "************************",
            "API_SECRET": "************************************",
            "API_PASS": "*********************"
        }
    }

To test in the sandbox mode, use your sandbox portfolio during initialization. If you want to test in live, use your live keys, while can be done like below:

from blankly import Kucoin
kucoin_sandbox = Kucoin(portfolio_name='KC Sandbox portfolio') # matching up with portfolio names in JSON
kucoin_live = Kucoin(portfolio_name='KC Live Keys')

# Proceed with the rest of your code
...

If you have any questions or feedback, please reach out to support@blankly.finance.

Ready to Learn More?

To learn more about the Blankly Package and our services, refer to our package documentation.

If you want to help out with the development of our package and platform, we would love to set up a call with you here. If you sign up, we'll send you a sticker and you'll be a part of the few lucky people who will get to enjoy two free months of the Blankly Platform, coming out soon!

Happy Trading,

The Blankly Team