Replace MT5 Account
Master API v1Update the login, password or server of an existing connected account.
https://api.algodeltafx.com/api/v1/users/broker/replacebrokerSwap the MT5 credentials or server behind an existing account slot, for example after a password change, a server migration or when a prop firm issues a new funded account. The broker_id stays the same.
Authentication
Send the master token as Authorization: <MASTER_TOKEN> (no Bearer prefix). Get one from Get Master Token.
Request body
JSON body, Content-Type: application/json.
- broker_idintegerrequired
ID of the connected account to replace. Get it from List MT5 Accounts.
- nic_namestringrequired
Nickname shown for this account in the dashboard and API responses.
- fx_serverstringrequired
MT5 broker server name exactly as it appears in the MetaTrader 5 login window, for example
Exness-MT5Real29. - fx_loginintegerrequired
MT5 account number (login ID).
- fx_passwordstringrequired
MT5 trading (master) password of the account. The investor (read-only) password cannot place trades.
- is_host_basedbooleanrequired
falseto connect by broker server name (fx_server).trueto connect directly to an access-server IP and port (fx_host,fx_port). - fx_hoststring
Access-server IP address. Required when
is_host_basedistrue. - fx_portintegerdefault 443
Access-server port. Used when
is_host_basedistrue.
Response
Returns the standard response envelope: status, msg and data.
Related endpoints
- List MT5 Accounts: List every MT5 account connected to your AlgoDeltaFX user.
- Add MT5 Account: Connect a new MetaTrader 5 account to your AlgoDeltaFX user.
- Delete MT5 Account: Disconnect and remove an MT5 account.
Example request
curl -X POST https://api.algodeltafx.com/api/v1/users/broker/replacebroker \
-H "Authorization: $MASTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"broker_id": 101,
"nic_name": "Joe Max",
"fx_server": "Exness-MT5Real29",
"fx_login": 12345678,
"fx_password": "MT5_PASSWORD",
"is_host_based": false,
"fx_host": "192.168.1.1",
"fx_port": 443
}'import os
import requests
res = requests.post(
"https://api.algodeltafx.com/api/v1/users/broker/replacebroker",
headers={"Authorization": os.environ["MASTER_TOKEN"]},
json={
"broker_id": 101,
"nic_name": "Joe Max",
"fx_server": "Exness-MT5Real29",
"fx_login": 12345678,
"fx_password": "MT5_PASSWORD",
"is_host_based": False,
"fx_host": "192.168.1.1",
"fx_port": 443
},
timeout=30,
)
data = res.json()
print(data["status"], data.get("msg"), data.get("data"))const res = await fetch("https://api.algodeltafx.com/api/v1/users/broker/replacebroker", {
method: "POST",
headers: {
Authorization: process.env.MASTER_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({
"broker_id": 101,
"nic_name": "Joe Max",
"fx_server": "Exness-MT5Real29",
"fx_login": 12345678,
"fx_password": "MT5_PASSWORD",
"is_host_based": false,
"fx_host": "192.168.1.1",
"fx_port": 443
}),
});
const { status, msg, data } = await res.json();
console.log(status, msg, data);using System.Net.Http.Headers;
using System.Text;
using var http = new HttpClient();
http.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", Environment.GetEnvironmentVariable("MASTER_TOKEN"));
var body = new StringContent("""
{
"broker_id": 101,
"nic_name": "Joe Max",
"fx_server": "Exness-MT5Real29",
"fx_login": 12345678,
"fx_password": "MT5_PASSWORD",
"is_host_based": false,
"fx_host": "192.168.1.1",
"fx_port": 443
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://api.algodeltafx.com/api/v1/users/broker/replacebroker", body);
Console.WriteLine(await res.Content.ReadAsStringAsync());Last updated 2026-11-04