# Connecting API Binance

> How to connect Binance API to Veles — with Fast connection or manually, and trade on Spot or Futures with bots.

:::caution[Attention!]
To trade on Binance Futures, ensure that:
- Your Futures account is [**activated**](https://help.veles.finance/en/exchange/binance/prepare/) (otherwise, only a Spot key will be created).
- **Classic Trading** mode is enabled (otherwise, the bot will stop with an error).
- Your trading account is **funded**, otherwise the Binding may not work properly.
- The account provides full access to manual trading (not a virtual account).
:::

## Fast connection to Binance

Fast connection is available for **main accounts**.
Subaccounts can only be connected **manually**.

1. Go to the [API key management page](https://veles.finance/cabinet/account/api)
or open the **Create bot** window.

2. Click **Add API Key** and select **Binance**.

3. Select **"One-click connection"**.

4. Log in to your Binance account.

5. Confirm the request to link your Veles account to Binance.

6. All set — you can now run bots on your Binance Spot and Futures accounts.

If for some reason "Fast connection" does not work, use **manual connection**.

:::caution[Important!]
By connecting, be sure to set up **lock "By Position"** for the created Binding.
:::

## Manually creating an API key on Binance and binding it to Veles

:::caution[Important!]
If you plan to use a Binance subaccount for bot trading, **do not create it using a virtual email**. Such subaccounts do not allow you to manage positions or cancel open orders via the Binance interface when needed. We strongly recommend using subaccounts created with a real email address to ensure full control over your positions.
:::

### Creating an API key on Binance

1. Log in to your Binance account → open **"Account"** in the profile menu → select **"API Management"**.

   On your mobile device (in **Pro** mode), tap **"More"**, then select **"API Management"**.

2. Click **Create API**.

3. Select the **"System generated"** API key type and click **Next**.

4. Enter a name for the key and click **Next**.

5. Pass the security check via **2FA**.

   Two-factor authentication is required to create an API.

6. After key creation, in the key settings, click **"Edit restrictions"** and configure **IP access restrictions**.

   Enable the **"Restrict access to trusted IPs only"** option.

   Add Veles IP addresses:

   ```
   5.9.195.106 5.9.195.107 5.9.195.108 5.9.195.109 5.9.195.110 5.9.200.58 5.9.200.59 5.9.200.60 5.9.200.61 5.9.200.62 88.198.100.162 88.198.100.163 88.198.100.164 88.198.100.165 88.198.100.166
   ```

7. Also mark the following options:

   - Enable Spot and Margin Trading
   - Enable Futures

### Binding an API key to Veles

1. Log in to your **Veles** personal account, click on the profile icon and select **"API Keys"** section.

2. Select the **Binance** exchange, click **"Add new API key"**, **"Manual Connection"**.

3. Give the new Binding an informative name (or leave **"Binance Futures"** by default), enter the data from Binance (**API Key**, **Secret**) and click **"Connect"**.

:::caution[Important!]
By creating the Binding, be sure to set up Lock **By Position** to avoid overlapping orders from multiple bots.
:::

---

Your **Binance** account is now successfully connected to the **Veles platform** — you can run trading bots and manage deals directly.
