> For the complete documentation index, see [llms.txt](https://docs.mojo.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mojo.trade/user-guide/connecting-your-binance-account.md).

# Connecting Your Binance Account

You can let your agents trade in your own Binance account. Nothing moves to Mojo: your funds stay on Binance, and Mojo gets permission to place orders there — not to withdraw.

Connecting takes about ten minutes, mostly on Binance's website. Follow the steps in order — two of them are easy to get wrong in ways you can't undo.

***

### Before you start

You'll need:

* A **Binance** account on binance.com with identity verification and two-factor authentication completed. Binance requires both before it lets you create an API key.
* **Portfolio Margin Mode** turned on for that account — that's Step 1. Mojo can't connect an account that is in Classic mode.

> ⚠️ **Turn on Portfolio Margin Mode before you create the API key.** When you turn it on, Binance permanently removes the futures permission from every API key already on your account, and it can't be restored. A key created earlier won't work with Mojo — you'd have to create a new one.

Where to start in Mojo:

* **Settings** → **Exchange accounts**, then **Connect** next to Binance
* the **Add now** banner on the **Assets** page, or the **Add Binance account** button above your holdings
* if you ask an agent to do something on Binance before you've connected, it shows a **Connect Binance to continue** card in the chat

All of these open the same connect screen. It has a short version of this guide and Mojo's IP address built in — keep it open while you work through Binance.

***

### Step 1 — Switch to Portfolio Margin Mode

On Binance, open the **Futures** trading page and click **Switch** next to **Account** (or go to **Settings** → **Account Mode**). Choose **Portfolio Margin Mode**, review the terms, and confirm.

Binance only lets you switch when your account is in a clean state:

* Your **Cross Margin** account is activated, with no loans, open orders, open positions, or negative balances.
* Your **USDⓈ-M Futures** account has no open orders, open positions, or negative balances — and is **not** using **Isolated Margin** or **Multi-Assets Mode**.
* Your **COIN-M Futures** account has no open orders, open positions, or negative balances, and is not using Isolated Margin.

Multi-Assets Mode is the one people miss. It's a separate futures setting that sounds like Portfolio Margin but actually blocks the switch — turn it off first.

If you don't see the **Switch** option, your account isn't eligible yet. Binance decides eligibility, and Mojo has no way around it. Binance also limits account-mode switches to 10 per 24 hours, so avoid switching back and forth.

Binance's guide: [How to Activate the Portfolio Margin Mode on Binance](https://www.binance.com/en/support/faq/how-to-activate-the-portfolio-margin-mode-on-binance-7ee6b3f65d5a421491c0a5588223fd14)

***

### Step 2 — Create an API key

On Binance, open your profile menu → **Account** → **API Management**, then click **Create API**.

* Choose **System-generated** as the key type. Self-generated keys aren't supported.
* Give the key a label, for example `Mojo`, and complete two-factor verification.

Binance's guide: [How to Create API Keys on Binance](https://www.binance.com/en/support/faq/360002502072) · Your keys: [API Management](https://www.binance.com/en/my/settings/api-management)

***

### Step 3 — Add Mojo's IP as a trusted IP

Do this **before** you touch the permissions. On Binance, a key without an IP restriction is read-only — the trading options simply won't turn on.

1. In Mojo's connect screen, copy the IP address shown under the guide. If more than one is listed, the copy button copies all of them.
2. In Binance's **API Management**, open the key you just created and edit its restrictions.
3. Under IP access, choose **Restrict access to trusted IPs only (Recommended)**, paste the address, and confirm it.
4. Save, and complete two-factor verification when Binance asks.

Check that the setting really saved as *trusted IPs only*. If the key is still unrestricted, the next step won't work and Mojo's check will fail.

A side benefit: Binance never expires a key that has an IP restriction, so this is a one-time setup.

***

### Step 4 — Set permissions, save, and enter the key in Mojo

Still editing the key, turn on:

* **Enable Reading** — usually on already
* **Enable Portfolio Margin Trading** — what agents use for futures
* **Enable Spot & Margin Trading** — what agents use for spot. Binance may label it Enable Spot & Margin & Stock Trading; it's one checkbox either way and can't be split. Mojo only places the orders you approve.
* **Permits Universal Transfer** — lets Mojo move funds between the wallets inside your own Binance account (Spot Wallet, Funding, Portfolio Margin), for example when an agent needs margin

Leave these **off**:

* **Enable Withdrawals** — Mojo refuses any key that can withdraw
* **Enable Internal Transfer** — also refused

You won't find an Enable Futures option: under Portfolio Margin Mode it doesn't exist. Enable Portfolio Margin Trading is the one you want.

Save the key. Then copy the **API Key** and the **Secret Key** into Mojo's connect screen and tap **Connect exchange**.

> 🔒 **Binance shows the Secret only once.** Copy it before you leave that page. If you lose it, delete the key on Binance and create a new one.

Mojo checks the key with Binance — that it works, that your account is in Portfolio Margin Mode, and that the permissions and IP restriction are set as above. This takes a few seconds. When it passes you'll see **Binance account added**, and Binance appears on your **Assets** page.

If it doesn't pass, Mojo tells you what to fix under **How to fix**. Most fixes are a single checkbox on Binance — tap **Back** (your entries are kept), fix it, and connect again. See [Troubleshooting](#troubleshooting) below.

***

### What connecting does — and doesn't — allow

Once connected, agents can:

* buy and sell spot in your Spot Wallet
* open, manage, and close USDⓈ-M and COIN-M perpetual positions, with Binance's own take-profit and stop-loss orders
* move funds between your Spot Wallet, Funding wallet, and Portfolio Margin account when a plan needs it

They can't — and Mojo has no permission to — withdraw, send funds to another account or exchange, or do anything you haven't approved. Every plan still goes through the card you confirm.

After connecting, Mojo also reads your recent Binance trading history so agents can start from how you actually trade. See the FAQ below.

***

### Managing the connection

Your connection lives under **Settings** → **Exchange accounts** (on web, a tab in the Settings dialog).

**If something breaks**, Mojo shows a notice on the Assets page — for example that the key stopped working, a permission is missing, or Mojo's IP address changed. Tap it to open the connect screen again:

* Fixed it on Binance? Just tap **Check again**.
* Need a new key? Paste the new key and secret and connect. The new key must belong to the same Binance account, and your agents carry on without interruption.

While a key isn't working, agents that use Binance pause automatically, and resume once the check passes.

**To disconnect**, use **Disconnect** (App) or **Unlink** (web) next to the account. Mojo stops the agents that use Binance and forgets the key. It does **not** cancel orders or close positions on Binance — anything already on the exchange stays yours to manage there. Disconnecting is final: reconnecting later doesn't restart the stopped agents.

After disconnecting, delete the key on Binance's [API Management](https://www.binance.com/en/my/settings/api-management) page. Mojo can't delete it for you.

***

### Troubleshooting

When a connection attempt fails, Mojo shows one of these. Every fix happens on Binance; then tap **Check again** in Mojo.

| What Mojo says                                                                | What's going on                                                                                  | What to do                                                                                                          |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| *Copy the full API key and secret…*                                           | Something got cut off, or has a space in it.                                                     | Paste both again, complete.                                                                                         |
| *Either the key or secret was copied incorrectly, or the IP list is missing…* | The key or secret is wrong, or the key's IP restriction doesn't include Mojo's address (Step 3). | Check the trusted IP first — it's the usual cause — then re-paste the key. If the secret is lost, create a new key. |
| *Only Portfolio Margin accounts can be connected…*                            | Your account is in Classic mode.                                                                 | Do Step 1, then check again. If the key was created before you switched, create a new one.                          |
| *The key does not have "…" enabled…*                                          | A required permission is missing.                                                                | Tick it on Binance, save, and check again. No new key needed.                                                       |
| *The key has "…" enabled. For the safety of your funds we do not accept it…*  | Withdrawals or internal transfers are turned on for the key.                                     | Mojo won't accept it. Create a new key with those off (Steps 2–4).                                                  |
| *A Binance account can be connected to only one Mojo account…*                | That Binance account is already connected to another Mojo account.                               | Disconnect it there first.                                                                                          |
| *You can only replace a key with one from the same Binance account…*          | While replacing a key, you pasted one from a different Binance account.                          | To change accounts, disconnect first, then connect the other one.                                                   |
| *Binance is busy or under maintenance…* / *Something went wrong on our side…* | Temporary. Nothing is wrong with your key.                                                       | Try again in a minute or two.                                                                                       |

***

### FAQ

#### How do I turn on Portfolio Margin Mode, and why does Mojo need it?

Follow Step 1 above, or Binance's guide: [How to Activate the Portfolio Margin Mode on Binance](https://www.binance.com/en/support/faq/how-to-activate-the-portfolio-margin-mode-on-binance-7ee6b3f65d5a421491c0a5588223fd14). The switch is on the Futures page, next to **Account**. Before Binance lets you switch, your Cross Margin and futures accounts must be free of loans, open orders, open positions and negative balances, with Isolated Margin and Multi-Assets Mode turned off. If you don't see the **Switch** option, your account isn't eligible yet — that's Binance's call.

Mojo needs it because agents place futures orders through Binance's Portfolio Margin interface. A key from a Classic-mode account can't be connected, and switching modes later also breaks existing keys (see the warning under *Before you start*).

#### How do I create an API key?

Follow Step 2 above, or Binance's guide: [How to Create API Keys on Binance](https://www.binance.com/en/support/faq/360002502072). Binance requires identity verification, two-factor authentication and at least one deposit before you can create a key. Choose **System-generated**, and keep the Secret safe — Binance shows it only once. Manage your keys at [API Management](https://www.binance.com/en/my/settings/api-management).

#### Can agents trade Binance's TradFi perpetuals — stocks, ETFs, commodities?

Yes, once your Binance account is set up for them. Binance's **TradFi Perps** are perpetual futures on traditional assets such as stocks, ETFs, gold and oil. Binance offers them only in eligible regions and asks you to accept a separate TradFi Perps agreement before your first trade. Do that on Binance yourself — open the **Futures** page, choose the **TradFi** tab, and follow Binance's prompts. Mojo can't accept it on your behalf.

If you ask an agent for a TradFi trade before that's done, Binance declines the order and Mojo tells you the account isn't set up for TradFi perpetuals yet.

Binance's pages: [Perpetual Futures on Traditional Assets](https://www.binance.com/en/support/faq/detail/fe7dcdf24f1943d98b368f5f9f744398) · [Binance Futures Launches TradFi Perpetual Contracts](https://www.binance.com/en/support/announcement/detail/ecf7318c0d434c339e80878588e700d0)

#### Can Mojo withdraw or move my funds out of Binance?

No. Mojo refuses any key that has withdrawal permission, and the only transfers it can make are between the wallets inside your own Binance account — Spot Wallet, Funding and Portfolio Margin — as part of a plan you approve. Your funds never leave your account. Your key is stored encrypted and is used only to sign orders; the AI never sees it.

#### Why does the key need "Enable Spot & Margin Trading"? Will Mojo trade on margin, or trade stocks?

Because Binance bundles spot, margin and (on some accounts) stock-token trading into one permission — it can't be split, and spot trading needs it. Mojo places only the orders in the plans you approve; a permission being available doesn't mean an agent will use it.

#### Why do I have to restrict the key to Mojo's IP? What if Mojo's address changes?

It's a Binance rule: a key without an IP restriction has no permission other than reading, so trading can't be turned on. Restricted keys also never expire on Binance. If Mojo's address ever changes, you'll see a notice on your Assets page with the new address to add — tap it, add the address on Binance, then **Check again**.

#### Can I connect two Binance accounts?

One Binance account per Mojo account, and each Binance account can be connected to only one Mojo account. To switch accounts, disconnect the current one first.

#### What does Mojo read from my Binance account?

Your balances, positions, open orders and trade history — for the Assets page, for your agents, and to build a short personalization profile that helps agents start from how you actually trade. After you connect, Mojo reads your Binance trades and transfers from the last three months, then keeps up with new ones. Mojo can't read your Binance login, and never sees your API secret in plain text. You can object to the personalization profile at any time — see [Section 3.2 of our Privacy Policy](https://www.mojo.trade/privacy-policy-en/).


---

# 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://docs.mojo.trade/user-guide/connecting-your-binance-account.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.
