# Delete MT5 Account

Disconnect and remove an MT5 account.

`POST https://api.algodeltafx.com/api/v1/users/broker/deletebroker`

- API: Master API (v1)
- Authentication: Send the master token as `Authorization: <MASTER_TOKEN>` (no `Bearer` prefix). Get one from [Get Master Token](/api/master-login/).

Remove a connected MT5 account from your AlgoDeltaFX user. Trading through AlgoDeltaFX stops for that account. Funds and positions at the broker are not affected.

## Request body (JSON)

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `broker_id` | integer | yes |  | ID of the connected account to delete. |

## Example: cURL

```bash
curl -X POST https://api.algodeltafx.com/api/v1/users/broker/deletebroker \
  -H "Authorization: $MASTER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "broker_id": 101
}'
```

## Example: Python

```python
import os
import requests

res = requests.post(
    "https://api.algodeltafx.com/api/v1/users/broker/deletebroker",
    headers={"Authorization": os.environ["MASTER_TOKEN"]},
    json={
        "broker_id": 101
    },
    timeout=30,
)
data = res.json()
print(data["status"], data.get("msg"), data.get("data"))
```

## Response

Standard envelope: `status` (boolean), `msg` (string), `data` (object or array).

## Related

- [List MT5 Accounts](https://docs.algodeltafx.com/api/list-accounts.md): List every MT5 account connected to your AlgoDeltaFX user.
- [Remove Account from Group](https://docs.algodeltafx.com/api/remove-account-from-group.md): Remove a child account from a copy group.


---
Source: https://docs.algodeltafx.com/api/delete-account/
