# Binance Portfolio Margin

### Prerequisites

* Complete KYC on Binance.com (regional variants such as Binance.US are not supported).
* Enable Portfolio Margin on your Binance account **before** creating the API key you plan to connect. Binance tags PM-enabled keys differently from standard keys, and the tag is applied at creation time.
* Be aware of an irreversible change: the moment you enable Portfolio Margin on your Binance account, the **Enable Futures** permission is stripped from every existing API key on that account and cannot be re-enabled. Any integrations relying on those old keys for futures will break. Plan key rotations accordingly.
* Fund the PM account's margin wallet. Tread reads the margin wallet balance, not the regular spot wallet.

### Step 1 - Create the API key on Binance

1. Log in to Binance, then go to **User Icon → Account → API Management → Create API**.
2. Choose **System generated** so Binance issues the key and secret for you.
3. Label the key.

### Step 2 - Set permissions

Enable the following on the new key:

* **Enable Reading**
* **Enable Spot & Margin Trading**
* **Enable Portfolio Margin Trading** (this is the checkbox that routes the key to Binance's PM endpoints)

Do **not** enable Futures here. Under Portfolio Margin, trading no longer goes through the standalone futures (fapi/dapi) endpoints, so the toggle is not needed.

#### Restrict to trusted IPs

Under IP access restrictions, select **Restrict access to trusted IPs only** and paste: `54.238.80.239`&#x20;

You can verify the current IP on your [Key Management](https://app.tread.fi/key-management) page.

### Step 3 - Register the key on TAAS

1. In tread, open **Wallets → Connect Exchange**.
2. From the exchange dropdown, select **Binance Portfolio Margin** (not plain Binance).
3. Paste the API key and secret.
4. Toggle on the asset types you plan to trade.
5. Save. You should now see your PM margin wallet balance on the Portfolio page.

### Troubleshooting

| Symptom                                         | Likely cause                                                                                                     |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| No balance shows after connecting               | Funds are in the spot wallet, not the PM margin wallet. Transfer into PM on Binance.                             |
| Order rejected with a permissions error         | **Enable Portfolio Margin Trading** was not ticked when the key was created. Recreate the key.                   |
| Futures orders fail on an unrelated integration | Expected. Enabling PM on your Binance account permanently removes Futures permission from all pre-existing keys. |


---

# 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://docs.tread.fi/account-creation-and-api-key-connection/connecting-to-exchanges/binance/binance-portfolio-margin.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.
