Trading robots for OKX Api.

Trading robots for OKX Api.

In this article, we will get acquainted with the cryptocurrency exchange OKX. Connect to the OKX API using the open-source algorithmic trading program OsEngine.

With OsEngine, you can trade on the OKX exchange with hundreds of different robots, learn how to create them yourself with testing, optimization, etc.

Don't forget about the 15% discount that you can get by registering there using the link.


1. Creating API keys to connect to the OKX API.

In the personal account, go to the API settings:

Click on the create API button:

The OKX API key creation window will open:

1. Select the type of key. API trading.

2. Enter some key name. This will not be necessary for us.

3. Enter the key password. You need to save it as it will be needed for further connection to OKX.

4. Don't forget to allow trading operations.

Save the key:

Carefully copy the secret and public keys to a file. You will need to enter them in OsEngine to access trading.


2. Connect to the OKX API from Os Engine.

In the main menu, select the Bot Station Light:

Open the connection menu to OKX:

1. Go to the available connections tab.

2. Find OKX in the list, right-click in the table.

3. Select "Settings" window.

In the window that opens, configure the access to the platform:

1. Fill in the "Public Key" field.

2. Fill in the "Secret Key" field.

3. Enter the key password.

4. Click "Connect".

And after that, you can use OsEngine as intended. Connect robots and trade:


As of today, OsEngine has about 200 FREE trading robots with open source code, with the ability to customize them to your needs. Enjoy!


Market orders do not work on the SPOT platform. Full support for Market orders is only for futures.


To trade futures, you need to set the correct portfolio mode. This is done in the web terminal:

And then you need to choose the Single-currency margin mode:

Good luck with your algorithms!

Os Engine support.