# Creating API Keys

## Creating a Binance API Key

{% embed url="<https://youtu.be/Hbw0FZKbHGU?si=M_9Z55jCZc73NbRE>" %}

1. Type in **API Management** in **\[Binance Searchbox].**

{% hint style="info" %}
As BitAI is a third party API Software, BitAI users have to allow unrestricted API access \
in their Binance App.&#x20;
{% endhint %}

2. **Uncheck** the tickbox. (**Remove the tick** in the tickbox) and then tap on **\[Create API].**
3. A) Scroll down to the bottom. \
   B) **Check** the tickbox. \
   C) Click **\[Confirm].**

## Configuring Binance API Key

{% embed url="<https://youtu.be/Hbw0FZKbHGU?si=D53WKijwQvrGj9ed&t=26>" %}

1. Ensure API Key type is **System generated** and click **\[Next]**.
2. A) Click **\[Edit]**\
   B) Scroll down and **check** on **\[Enable Spot & Margin Trading],** **check** on **\[Enable Futures]** and **check** on **\[Enable Symbol Whitelist].**
3. Key in all 15 crypto pairs individually, tap on **\[Add]** to add the symbol. Check that all 15 crypto symbols are correct and end with USDT and tap **\[Confirm] once you have added all 15 Crypto symbols.**

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

{% embed url="<https://youtu.be/Hbw0FZKbHGU?si=WRBzkdtZ0Cb6HjWB&t=66>" %}

1. Under IP Access restrictions, select **\[Restrict access to trusted IPs only].**
2. **Key in IP Addess: 8.219.194.3**&#x20;
3. Tap on **\[Confirm]**.
4. Scroll up and **copy** your **Secret Key** and **API Key**.

{% hint style="info" %}
Secret Key and API Key is required to link BitAI to Binance. **Do ensure you have copied your Secret Key as it will only appear once**. You will have to delete and recreate a new API if you forget to copy your Secret Key.
{% endhint %}

4. After copying both keys, scroll up and click **\[Save]**.

## Adding API Keys to BitAI

Open your BitAI app or click [**here**](https://app.bitai.app/h5/#/) to go to login to BitAI using the Progressive Web App version.

{% embed url="<https://youtu.be/Hbw0FZKbHGU?si=LTAaRBrMPlNyBznx&t=90>" %}

1. Click on **\[API]**, toggle right to turn on API Protection and click on **\[Add API]**.
2. Click on <img src="/files/Dvv90psS5jNWwe1bABVl" alt="" data-size="line"> located on the top right and click on **\[Bind the Binance API]**.
3. Paste the Binance **Secret Key** and **API Key** you have copied earlier to the text boxes accordingly and click on **\[Bind API]**.

{% hint style="info" %}
Click [**here**](/affinityai-whitepaper/7J1OVBdlGjmH0e7GydId/beginner-guide/purchasing-usdt.md) if you do not know how to purchase USDT.&#x20;
{% endhint %}

4. Click **\[Next]** below to transfer USDT from Binance Funding Wallet to Binance USD-M Futures Account.


---

# 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://affinity-ai-pte-ltd.gitbook.io/affinityai-whitepaper/7J1OVBdlGjmH0e7GydId/getting-started/api-keys.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.
