MT5 REST API reference
Every endpoint of the AlgoDeltaFX MetaTrader 5 API. All requests and responses are JSON over HTTPS. Import them all at once with the OpenAPI 3.1 spec or the Postman collection.
Account API (v2)
Trade one MetaTrader 5 account: place, modify, cancel and close orders, and read positions, symbols and history.
Base URL
https://api.algodeltafx.com/api/v2/forexaccountSend the account token as Authorization: Bearer <ACCOUNT_TOKEN>. See Authentication.
Orders & positions
| Endpoint | Path | Description |
|---|---|---|
| Place Order | POST /placeorder | Open a market order or place a pending order (limit, stop, stop-limit) on an MT5 account. |
| Modify Order or Position | POST /modifyorderorposition | Change the stop loss, take profit or price of an open position or pending order. |
| Cancel Order | POST /cancelorder | Cancel a pending order by ticket, or all pending orders for a symbol and side. |
| Close Position | POST /squareoffposition | Close an open position fully or partially by ticket, or close all positions on a symbol. |
| Get Open Positions | GET /getopenpositions | List every open position on the MT5 account. |
| Get Pending Orders | GET /getpendingorders | List every pending (limit, stop, stop-limit) order on the MT5 account. |
Account data
| Endpoint | Path | Description |
|---|---|---|
| Get Account Profile | GET /getprofile | Read the MT5 account profile and details. |
| Get Symbols | GET /getsymbols | List the tradable symbols on the account, with broker suffixes. |
Trade history
| Endpoint | Path | Description |
|---|---|---|
| Position History | POST /gethistorypositions | Closed positions in a date range, with cursor pagination. |
| Deal History | POST /gethistorydeals | Executed deals (fills) in a date range, with cursor pagination. |
| Order History | POST /gethistoryorders | Historical orders (filled, cancelled, expired) in a date range. |
| Balance History | POST /gethistorybalance | Balance operations (deposits, withdrawals, credits) in a date range. |
| History Summary | POST /gethistorysummary | Aggregated trading summary for a date range. |
Master API (v1)
Manage many MT5 accounts: connect accounts, build copy trading groups, set lot sizing and pull daily profit.
Base URL
https://api.algodeltafx.com/api/v1Send the master token as Authorization: <MASTER_TOKEN> (no Bearer prefix). Get one from Get Master Token.
Authentication
| Endpoint | Path | Description |
|---|---|---|
| Get Master Token | POST /auth/userlogin | Log in with your AlgoDeltaFX credentials to get a master token for the Master API. |
MT5 accounts
| Endpoint | Path | Description |
|---|---|---|
| Add MT5 Account | POST /users/broker/addfxbroker | Connect a new MetaTrader 5 account to your AlgoDeltaFX user. |
| Replace MT5 Account | POST /users/broker/replacebroker | Update the login, password or server of an existing connected account. |
| Delete MT5 Account | POST /users/broker/deletebroker | Disconnect and remove an MT5 account. |
| List MT5 Accounts | GET /users/broker/getbrokers | List every MT5 account connected to your AlgoDeltaFX user. |
| Daily Profit | POST /users/broker/getdailyprofit | Daily profit for one account over a date range. |
Copy trading groups
| Endpoint | Path | Description |
|---|---|---|
| List Copy Groups | GET /users/group/getgroups | List your copy trading groups. |
| List Group Accounts | POST /users/group/getgroupbrokers | List the accounts in a copy group with their lot settings. |
| Add Account to Group | POST /users/group/addgroupbroker | Add an MT5 account to a copy group as a child, with its lot sizing rule. |
| Update Group Account | POST /users/group/updategroupbroker | Change the lot sizing rule of an account in a copy group. |
| Pause or Resume Copying | POST /users/group/updatechildtradingflag | Pause or resume copying for one child account. |
| Remove Account from Group | POST /users/group/removegroupbroker | Remove a child account from a copy group. |
Last updated 2026-11-04