Trading robots for KuCoin API.

Trading robots for KuCoin API.

In this article, we will learn how to connect OsEngine to an account on the KuCoin exchange through the trading API. For those who are new to OsEngine, it is a ready-made terminal and ecosystem for algorithmic trading with dozens of built-in robots, a tester, robot creation layers, and much more.

Be sure to register on the website with a promo code, it will give you a 20% discount on commission.

1. Setting up the KuCoin API key.

First, we will need to create keys to access the exchange.

To do this, go to your personal account on the exchange.

And go to the "API Management" section.

You must follow the mandatory security measures and undergo verification, otherwise you will not be able to issue API keys.

When setting up the trading password, you should only enter digits (6 digits without letters and other characters).

 

2. Issue a token.

1. Click on the "Create API" button.

2. Enter the API name, it is needed for reference. You can enter anything.

3. API password - set a password and save it for yourself. This password will be used for trading and is needed to connect the KuCoin API to OsEngine.

4. Check the necessary permissions - in our case, we check "Spot Trading" and "Futures".

5. Leave "No limit" or bind the usage to a specific IP address.

6. Click "Next".

The interface will ask you to enter a captcha, and then a form will appear to confirm the creation of the API:

Enter the trading password (this is in your exchange account, NOT the API password) and codes from your email (you need to click "Send Code" for it to be sent there) and authentication (Google or SMS, depending on what you have enabled in your exchange account).

Enter all passwords and codes and click "Confirm".

A message "API created!" will appear:

1. In the image below arrow 1, your API key is saved for future use.

2. Below arrow 2, your API Secret is a secret code that you must also save right now, because you won't be able to see it again. So copy it immediately.

Click confirm and the key creation is complete. You now have three elements we need to connect to the exchange:

1. API key (Key, public key).

2. API secret key (Secret, secret key).

3. API password.

 

3. Demo access does not work.

According to the API documentation, demo API and demo trading on KuCoin were intended, but at the moment the functionality is no longer available, so test at your own risk on live trading only. Be cautious.

 

4. Open OsEngine and go to connection settings.

In the main menu, go to Robots. Light.

Then go to server connections and select the "KuCoinSpot" connection.

A window will open for connecting to KuCoinSpot.

1. Enter the "Public Key" you received in your exchange account when creating the API.

2. Enter the "Secret Key" you received in your exchange account when creating the API. The one you had to save.

3. In the "Password" field, enter the API Password that you specified when creating the API key.

4. Click "Connect"!

 

5. Enable any robot and start trading!

For example, use the free StrategyBollinger robot on the 5-minute timeframe of the ETH-USDT currency pair.

Currently, OsEngine includes about 200 FREE trading robots with open source code, allowing you to modify them as needed. Enjoy!

IMPORTANT!!!

You can only download historical data from this exchange from a Spot account. Futures is not supported.

If you have any difficulties or questions, please write to the support chat. Link