# How to create an API-key?

**Pay attention:**

{% hint style="warning" %}

* The API key management is not supported by the Binance mobile app or by the mobile version of the Binance website.\
  **Please use the desktop version of the website to proceed.**
* Stoic will manage **all funds available** in your Spot balance. Thus, if you don't want to get some of your funds sold by Stoic when it will form a top 30 altcoins portfolio, it is recommended to use a separate Binance account or a Binance sub-account.
  {% endhint %}

1\. Open the Binance website and log in using your credentials. Tap on the **\[Profile tab]** in the top right corner of the screen:

![](https://downloads.intercomcdn.com/i/o/368038995/567a5414cfa4b25b2dcfc8b4/Slice+1.png)

\
2\. Tap on the **\[API Management]** button:<br>

![](https://downloads.intercomcdn.com/i/o/366746319/24d57bfdbb1c1455b4c89eff/api+management.png)

3\. You will be asked to **give the API key a label**.\
We suggest giving it a name that will help you immediately recognize this API key e.g. "Stoic API ke&#x79;**"**.

![](https://downloads.intercomcdn.com/i/o/366752278/be84db5385245c310f449f59/API-kkek.png)

4\. You will need to confirm creating the API via inputting codes Binance sends to ensure the action.

5\. You should **save the** **Secret Key somewhere safe.**

{% hint style="warning" %}
Pay attention: **The Secret key is displayed only once** after the API was created and **can't be restored**. If you lose this key, you will need to delete this API and set up a new one. **Stoic needs the Secret key to be visible to connect.**
{% endhint %}

6\. Tap on the **\[Edit restrictions]** button:

![](https://downloads.intercomcdn.com/i/o/368044496/2ce48c804a756c211e40e15f/Group+5.png)

7\. Select the **\[Enable Spot & Margin Trading]** option and tap on the **\[Save]** button:

![](https://downloads.intercomcdn.com/i/o/368046746/13163a96a28cdcca79efed76/arrow.png)

8\. Congratulations, the API was successfully set up!

9\. Please use the **API key** to connect Stoic to your Binance account, Secret key should be visible.

![](https://downloads.intercomcdn.com/i/o/302996499/07d80ecf110e4045a7f72d58/image.png)

{% hint style="warning" %}
Your API key is stored in the encrypted storage and the only access that we ask you to provide us is access to create orders on your Binance account – we don't have the right to withdraw funds, thus you are always the only person in control of your funds.
{% endhint %}

## Restrictions for the Binance **Sub-Account** <a href="#h_d9326c73db" id="h_d9326c73db"></a>

If you use Sub-Account, you will be presented with slightly different options in the API key creation menu.

{% hint style="warning" %}
Please make sure to select **\[Enable Spot & Margin Trading]** and **\[Unrestricted API access].** Stoic will require only these two functions to manage your Sub-Account.<br>
{% endhint %}

![](https://downloads.intercomcdn.com/i/o/278920754/605daa4cdace7724af8df6f0/image.png)


---

# 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://cindicator.gitbook.io/stoic-ai/stoic/how-to-connect-stoic/how-to-create-an-api-key.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.
