MT5 API documentation
The AlgoDeltaFX MT5 API is a REST API for MetaTrader 5. Place, modify and close trades on any MT5 account, read positions and trade history, and run cross-broker copy trading across thousands of accounts, all over HTTPS. No terminal, EA or VPS required.
- Protocol
- HTTPS REST, JSON
- Auth
- JWT tokens
- Platform
- MetaTrader 5
- Brokers
- Any MT5 broker or prop firm
- Hosting
- Cloud, no VPS
Place an MT5 trade in one request
Copy your account token from the dashboard and send the order. type: 0 is a market Buy. See all 8 order types.
curl -X POST https://api.algodeltafx.com/api/v2/forexaccount/placeorder \
-H "Authorization: Bearer $ACCOUNT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"symbol": "EURUSD",
"type": 0,
"volume": 0.5,
"sl": 1.082,
"tp": 1.095
}'import os
import requests
res = requests.post(
"https://api.algodeltafx.com/api/v2/forexaccount/placeorder",
headers={"Authorization": f"Bearer {os.environ['ACCOUNT_TOKEN']}"},
json={
"symbol": "EURUSD",
"type": 0,
"volume": 0.5,
"sl": 1.082,
"tp": 1.095
},
timeout=30,
)
data = res.json()
print(data["status"], data.get("msg"), data.get("data"))const res = await fetch("https://api.algodeltafx.com/api/v2/forexaccount/placeorder", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ACCOUNT_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"symbol": "EURUSD",
"type": 0,
"volume": 0.5,
"sl": 1.082,
"tp": 1.095
}),
});
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.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ACCOUNT_TOKEN"));
var body = new StringContent("""
{
"symbol": "EURUSD",
"type": 0,
"volume": 0.5,
"sl": 1.082,
"tp": 1.095
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://api.algodeltafx.com/api/v2/forexaccount/placeorder", body);
Console.WriteLine(await res.Content.ReadAsStringAsync());{
"status": true,
"msg": "Order placed",
"data": {
"ticket": 1093918439
}
}Two APIs, one platform
Account API v2
Trade one MetaTrader 5 account: place, modify, cancel and close orders, and read positions, symbols and history.
https://api.algodeltafx.com/api/v2/forexaccount
Master API v1
Manage many MT5 accounts: connect accounts, build copy trading groups, set lot sizing and pull daily profit.
https://api.algodeltafx.com/api/v1
Guides
MT5 API with Python
Place, modify and close MetaTrader 5 trades from Python with the AlgoDeltaFX REST API. Works on Linux, macOS and Windows with plain requests, no MT5 terminal or VPS needed.
MT5 API with Node.js
Trade MetaTrader 5 accounts from Node.js, TypeScript, Deno or Bun with the AlgoDeltaFX REST API using built-in fetch. No terminal, EA or VPS required.
Connect an MT5 account via API
Connect MetaTrader 5 accounts to the AlgoDeltaFX cloud programmatically by login, password and server name, or by access-server IP. Works with any MT5 broker and prop firm.
MT5 Copy Trading API
Build a MetaTrader 5 copy trading platform with the Master API: connect accounts, add children to a master, set multiplier, fixed or balance-based lots.
MT5 trade history API
Download MetaTrader 5 trade history over REST. Learn the difference between MT5 positions, deals and orders, and page through history with cursors for journals and reports.
MT5 REST API vs MQL5 vs Python package
Compare MQL5 Expert Advisors, the MetaTrader5 Python package, the broker Manager API and a cloud MT5 REST API on hosting, languages and multi-account support.
What is the AlgoDeltaFX MT5 API?
AlgoDeltaFX is a cloud trading automation platform for MetaTrader 5. Its API connects directly to your broker's MT5 servers, so your code can trade an MT5 account from any language, OS or cloud without running MetaTrader. The Account API handles one account: market and pending orders, SL/TP changes, partial closes, open positions, symbols, and position, deal, order and balance history. The Master API handles many accounts: connect MT5 accounts at any broker, add them to copy trading groups with multiplier, fixed-lot or balance-based sizing, pause them and pull daily profit.
Developers use it to build trading bots, signal and Telegram bots, fund and prop-firm dashboards, and complete copy trading platforms. Your funds never leave your broker: the API can trade, but it cannot withdraw.
FAQ
What is the AlgoDeltaFX MT5 API?
A REST API for MetaTrader 5. The Account API trades one MT5 account (orders, positions, symbols, history); the Master API manages many accounts, copy trading groups, lot sizing and daily profit.
Do I need a MetaTrader terminal, EA or VPS?
No. AlgoDeltaFX connects to your broker's MT5 servers from its cloud, so nothing has to run on your machine.
Which brokers work with the MT5 API?
Any broker or prop firm that offers MetaTrader 5. Accounts at different brokers can be controlled from the same API.
Which languages are supported?
Any language that can make HTTPS requests. The docs include cURL, Python, Node.js and C# examples, an OpenAPI 3.1 spec and a Postman collection.
Last updated 2026-11-04