---
id: document_item.adding-api-keys-to-the-moonbot-terminal
page_type: documentation_article
title: "在 Moonbot 终端中添加 API 密钥"
description: "如何在 Settings → Login 中添加 API Key 和 Secret Key、注册与交易所的连接，并在 Moonbot 终端中检查 Connection OK 状态。"
section: documentation
category: "Moonbot 终端使用要点 / 在本地电脑上安装 Moonbot"
url: https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer/adding-api-keys-to-the-moonbot-terminal?format=md
locale: zh
alternate_ru: https://moonbot.eu/documentation/installing-moonbot-on-a-local-computer/adding-api-keys-to-the-moonbot-terminal?format=md
alternate_en: https://moonbot.eu/en/documentation/installing-moonbot-on-a-local-computer/adding-api-keys-to-the-moonbot-terminal?format=md
parent: https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer?format=md
previous: https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer/launching-the-moonbot-terminal?format=md
next: null
status: published
updated_at: 2026-11-11T16:09:36+03:00
---

# 在 Moonbot 终端中添加 API 密钥

在 Moonbot 终端中打开 **Settings** **→** **Login** 选项卡，选择界面语言（俄语、英语或西班牙语），然后注册之前从交易所获取的 API 密钥。分步说明见我们的网站：

- [连接 Binance 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-binance-exchange?format=md)
- [连接 HTX 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-htx-exchange?format=md)
- [连接 Bybit 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-bybit-exchange?format=md)
- [连接 Gate.io 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-gate-exchange?format=md)
- [连接 Bitget 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-bitget-exchange?format=md)
- [连接 OKX 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-okx-exchange?format=md)
- [连接 Hyperliquid 交易所](https://moonbot.eu/zh/documentation/settings-login-tab/connecting-to-the-hyperliquid-exchange?format=md)

Moonbot 终端通过交易所的 API 与交易所交互。要获得 API 的访问权限，需要 API 密钥。

首次启动 Moonbot 时需要输入 API 密钥，它由一对 **API Key** 和 **Secret Key** 组成：

- **API Key**——公钥，用于注册您的终端副本。
- **Secret Key**——私钥，用于为订单签名。私钥以加密形式保存在您电脑本地的 **BotConfig.bcfg** 文件中，该文件由 Moonbot 自动创建。

**⚠ 重要！Secret Key** 绝不会被 Moonbot 终端传输到互联网。

之后再启动终端时，无需重新输入 API 密钥，因为它们已以加密形式保存在 BotConfig.bcfg 文件中，与交易所的连接会自动建立。

#### 在终端中注册 API 密钥

在 **Settings** **→ Login** 选项卡上选择要交易的交易所。例如，如果您计划在 Binance 交易所（合约市场）交易，请选择 **Binance Futures** 并点击 **Apply**（应用）。

1. 在 **API Key** 字段中输入 API Key
2. 在 **API Secret** 字段中输入 Secret Key
3. 点击 **Register API keys**（注册 API 密钥）按钮。

![](https://moonbot.eu/storage/editor-images/RU01_05.jpg)

如果密钥输入正确，终端将与交易所服务器建立连接，**Settings** → **Login** 选项卡上会显示您的 Moonbot 注册编号，主窗口左下角会出现状态 **Connection: OK**。

为提高安全性，可以为打开 Moonbot 终端设置密码，每次启动时都会要求输入。该密码同样保存在本地，不会传输到网络。

## 导航

路径: [首页](https://moonbot.eu/zh?format=md) / [文档](https://moonbot.eu/zh/documentation?format=md) / [Moonbot 终端使用要点](https://moonbot.eu/zh/documentation/basics?format=md) / [在本地电脑上安装 Moonbot](https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer?format=md) / 在 Moonbot 终端中添加 API 密钥

上级栏目: [在本地电脑上安装 Moonbot](https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer?format=md)

上一页: [启动 Moonbot 终端](https://moonbot.eu/zh/documentation/installing-moonbot-on-a-local-computer/launching-the-moonbot-terminal?format=md)
