# Binance

{% embed url="<https://www.youtube.com/watch?v=-sWEOzK3xCg>" %}

## Important Note

This is specifically for regular Binance, not **Binance Portfolio Margin and Binance Portoflio Margin Pro program.** \
\
**For further details please see:**<br>

{% content-ref url="/pages/bPVwAWAZNRxvc7fTs6Zf" %}
[Binance Portfolio Margin](/account-creation-and-api-key-connection/connecting-to-exchanges/binance/binance-portfolio-margin.md)
{% endcontent-ref %}

{% content-ref url="/pages/GBq6V8AXI6B1yepMPOe9" %}
[Binance Portfolio Margin Pro](/account-creation-and-api-key-connection/connecting-to-exchanges/binance/binance-portfolio-margin-pro.md)
{% endcontent-ref %}

## Prerequisites

Before proceeding with API Key creation please ensure the following:

1. Ensure you have completed KYC Verification with Binance **(This is for Binance.com, we do not support Binance.us or any other region specific Binance)**
2. Ensure you have enabled futures trading if you are going to be trading perpetual  futures contracts. For more information please refer to this guide from [Binance](https://www.binance.com/en/support/faq/detail/360033772992).
   1. <sub>***Please note:***</sub><sub>*&#x20;*</sub><sub>*&#x20;*</sub><sub>*API Keys created before you have enabled futures trading on your Binance account will not allow you to enable futures trading for this key. You must have futures trading enabled on your Binance account before you create the key.*</sub>
3. Ensure your account is funded.

## API Key Creation

<figure><img src="/files/bztMFZfnB3fUEoXtcums" alt=""><figcaption><p><a href="https://www.binance.com/en/my/settings/api-management">Binance's API Management</a></p></figcaption></figure>

#### Access Binance API Management

* On Binance.com, Navigate to User Icon
* Select Account
* Select [API Management](https://www.binance.com/en/my/settings/api-management)
* Select Create API

#### Choose API Key Type

* You will be prompted to choose the type of API Key. Select **System-generated** to automatically provide both the API Key and Secret Key and select next.
* Set a Name for this API Key and proceed to 2-Factor Authentication

#### Setting Permissions

* Click **Edit Restrictions**
* **Important:** Under **IP access restrictions,** select restrict access to trusted IPs only and paste in **54.238.80.239 and click confirm**
  * <sub>To verify this is the most up-to-date IP to whitelist, navigate to the tread.fi's API Key Management</sub> [<sub>page</sub>](https://app.tread.fi/key_management)<sub>. Make sure you have already created an acount and logged in.</sub>
  * <sub>Click Link Exchange API Key, the IP is located at the bottom of the Link API Key dialog box.</sub>

<figure><img src="/files/VWqxSR8pCZpSuba8Z5XM" alt=""><figcaption></figcaption></figure>

* After adding the IP address, you will now be able to edit the other API restrictions, enable the following:
  * Enable Reading
  * Enable Spot & Margin Trading
  * Enable Futures (if you intend to trade them)
* Once complete click save and complete security verification requirements.

### Linking API Key to tread.fi&#x20;

<figure><img src="/files/clszqMHZFbMEZkKaFKqV" alt=""><figcaption></figcaption></figure>

* Open up tread's Key Management menu. From the app.tread.fi home page, it can be accessed by clicking on the wallet icon on the top right.
* Click Connect CEX Account
* Select Binance from the Exchange dropdown
* Set a name for this key for your own reference.
* Copy and Paste the API Key and Secret from Binance into the respective boxes.
* Enable the asset types you want to trade.&#x20;
  * **Note:** If you did not enable these on Binance as mentioned in the previous step, these checkboxes will not allow you to trade those assets.&#x20;
* Click submit.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tread.fi/account-creation-and-api-key-connection/connecting-to-exchanges/binance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
