> For the complete documentation index, see [llms.txt](https://guide.moontrader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.moontrader.com/nachalo-raboty/rabota-s-birzhei/poluchenie-api-klyuchei-dlya-torgovli/poluchenie-api-klyuchei-dlya-binance.md).

# Получение API ключей для Binance

{% hint style="warning" %}
Перед созданием ключей должна быть пройдена верификация и настроена двухфакторная аутентификация Google Authenticator.
{% endhint %}

#### Основной аккаунт

1. Войдите в аккаунт Binance
2. Перейдите в раздел управления API: «Аккаунт» → «Управление API»

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FfESJfnyeacFFM1dSvUB3%2Fimage.png?alt=media&amp;token=f59afe2e-f602-4ce1-90a7-d072d2e76ae0" alt=""><figcaption></figcaption></figure>
3. Нажмите «Создать API», выберите тип ключа «Сгенерированный системой»

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FTbTk5eQBrOOyYC9fmM84%2Fimage.png?alt=media&amp;token=633501d2-ad97-4428-b36b-0b88fa1a9406" alt=""><figcaption></figcaption></figure>
4. Введите имя ключа (например, «MoonTrader»)

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FNbgSMtaIipMQwEMSpRa8%2Fimage.png?alt=media&amp;token=43215fde-23db-4110-8dbb-996a197537ef" alt=""><figcaption></figcaption></figure>
5. Подтвердите через email и 2FA<br>

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FqdxEOcgaABTtQ7UTa79O%2Fimage.png?alt=media&amp;token=f8b23cf8-2ebf-4e78-9528-3715dc004f22" alt=""><figcaption></figcaption></figure>

#### Настройка прав доступа

<details>

<summary>По умолчанию торговля фьючерсами через API недоступна.</summary>

Чтобы активировать фьючерсы для API:

1. Перейдите на сайт Binance в раздел «Фьючерсы»
2. Пройдите обязательный тест на знание фьючерсной торговли
3. После успешного прохождения теста фьючерсы станут доступны для добавления в API-ключ

</details>

Только после выполнения этих шагов вы сможете использовать фьючерсную торговлю через MoonTrader.

Установите следующие права:

* «Разрешить чтение»
* «Включить фьючерсы»
* «Включить спотовую и маржинальную торговлю»
* «Включить возможность внутренних переводов»

<figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FqVxTCK8Ez76KBg3p1B1c%2Fimage.png?alt=media&amp;token=a171626d-8d03-4beb-9a9e-0cf6255d68f2" alt=""><figcaption></figcaption></figure>

#### Настройка белого списка IP

При создании API-ключей рекомендуется указать список разрешённых IP-адресов. Только устройства с указанными IP смогут использовать ключ — это защищает от несанкционированного доступа, даже если злоумышленник получит ваши ключи.

**Какие IP указывать:**

* IP сервера с ядром MoonTrader — откуда отправляются торговые запросы
* IP сервера с Watchdog — если используете систему мониторинга для нескольких аккаунтов

**Настройка:**

1. Включите «Разрешить доступ только доверенным IP-адресам»
2. Добавьте внешний статический IP вашего сервера с ядром MoonTrader
3. Если используете Watchdog на отдельном сервере — добавьте также его IP

<figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FMFj0qoeJtWphbbUpvLw6%2Fimage.png?alt=media&amp;token=9a545318-ffcb-4d40-8d8c-b2a088aad5ef" alt=""><figcaption></figcaption></figure>

#### Сохранение ключей

Сохраните **Секретный ключ (Secret Key)** — он отображается только один раз.

<figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FpMmzv8BIbETOarvoY1Q0%2Fimage.png?alt=media&amp;token=25338cea-437a-4a7d-b92f-edcf41fa1c8f" alt=""><figcaption></figcaption></figure>

#### Создание ключей для субаккаунтов

Для субаккаунтов перейдите: «Профиль» → «Субаккаунты» → «Управление API»

<figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2Fch3c6MFFuAdjExhPUEXV%2Fimage.png?alt=media&amp;token=cdd75e04-a7d3-4a95-a8e2-32a74e47803b" alt=""><figcaption></figcaption></figure>

1. Нажмите «Создать API», выберите тип ключа «Сгенерированный системой»

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2FWYhZSF74hXuckYVHOSyH%2Fimage.png?alt=media&amp;token=65b88944-bc10-42b5-a17c-8cc21fb27cc2" alt=""><figcaption></figcaption></figure>
2. Выберите нужный субаккаунт из списка

   <figure><img src="https://1239712751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6YJjJCgPnTM5DnaNQoXz%2Fuploads%2Fqw6E3X0OfbLUmlOQS3hg%2Fimage.png?alt=media&amp;token=a913fef5-0d9b-48fc-9928-c9ea1c1dda58" alt=""><figcaption></figcaption></figure>
3. Повторите все шаги создания ключа


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guide.moontrader.com/nachalo-raboty/rabota-s-birzhei/poluchenie-api-klyuchei-dlya-torgovli/poluchenie-api-klyuchei-dlya-binance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
