Skip to content

Connecting API OKX

A Fast One-click connection is available for main OKX accounts. Subaccounts can be connected manually only.

Before creating the key, make sure that your account type on OKX supports futures trading — otherwise, only the spot key will be created.

  1. Go to the API Key Management page or open the bot creation window on the Veles platform.

  2. Click “Add API Key” and select OKX.

    Adding the OKX key

  3. Click “One-click connection”.

    Fast connection

  4. Log in to your OKX account.

    OKX authorization

  5. Click “Approve” to confirm the request.

    Connection confirmation

If your OKX account has already been linked to Veles, the exchange may reject the request when trying to create a new key. To recreate the key, follow these steps:

  1. Remove the binding in Veles on the API Key Management page.

    List of bindings

  2. Delete the old key on the OKX API management page: https://www.okx.cab/ru/account/my-api.

    Key deletion

  3. Create a new key according to the instructions above.

If “Fast Connection” does not work, use the manual procedure.

Manually creating an API key on OKX and linking it to Veles

Section titled “Manually creating an API key on OKX and linking it to Veles”
  1. In the upper-right corner, click on the user icon, then select “API”.

    OKX API menu

  2. Click “Create API Key V5”.

    Creating a new key

  3. On the key creation page:

    • use “Linking to a 3rd party application” - select “Veles”;
    • enable the “Trade” permission;
    • enter the passphrase (Latin letters only);
    • press “Submit all”;
    • save all the key data in a safe place (for example, in a password manager).

    Configuring API permissions

  4. Enter verification code sent to your phone to confirm the creation of the key.

  1. Log in to your Veles personal account and click “Create a bot”, alternatively, go to Settings → API Keys.

    Creating a Veles bot

  2. Select OKX exchange, then “Add new API key” → “Manual connection” and specify the type of binding (Spot or Futures).

    OKX Exchange selection

  3. Enter the API key data, give an informative name (for example, OKX Futures Main) and click “Connect”.

    Saving the Binding