Forex API · MT5 REST API

The MT5 API for trades, positions and many accounts at once

Trade any connected MetaTrader 5 account over simple HTTPS, then use the Master API to onboard accounts, build copy groups, set multipliers and pull daily profit. Everything you need to run your own trading platform, with no terminal or VPS to host.

  • REST + JSON
  • JWT auth
  • 8 order types
  • Multi-account Master API

What is the AlgoDeltaFX Forex API?

It is a REST API for MetaTrader 5 with two layers. The Account API trades a single MT5 account: place, modify and cancel orders, close positions, and read profile, symbols, open positions and pending orders. The Master API controls every account you own: add or replace MT5 accounts, create copy groups, set multiplier, fixed-lot or balance-based sizing, pause child accounts and fetch daily profit. Both use JWT authentication and run in the AlgoDeltaFX cloud.

Protocol
HTTPS REST, JSON
Auth
JWT (Bearer)
Base URL
api.algodeltafx.com
Order types
Buy/Sell, Limit, Stop, Stop-Limit
Docs
docs.algodeltafx.com

Two APIs, one platform

Account API for trading. Master API for scale.

Account API · v2

Trade one MT5 account

Authenticate with the account's JWT and manage its orders and positions directly. Ideal for bots, signal engines and custom front ends.

GET
/api/v2/forexaccount/getprofileAccount profile and details
GET
/api/v2/forexaccount/getsymbolsTradable symbols with broker suffixes
GET
/api/v2/forexaccount/getopenpositionsAll open positions
GET
/api/v2/forexaccount/getpendingordersAll pending orders
POST
/api/v2/forexaccount/placeorderMarket, limit, stop and stop-limit orders
POST
/api/v2/forexaccount/modifyorderorpositionChange price, SL or TP of an order/position
POST
/api/v2/forexaccount/cancelorderCancel by ticket, symbol or side
POST
/api/v2/forexaccount/squareoffpositionClose fully or partially by ticket, symbol or side
Master API · v1

Manage many accounts & build your own platform

Authenticate as your AlgoDeltaFX user and automate onboarding, copy groups, risk settings and reporting across every account.

POST
/api/v1/auth/userloginGet a master token for your AlgoDeltaFX user
POST
/api/v1/users/broker/addfxbrokerConnect a new MT5 account
POST
/api/v1/users/broker/replacebrokerUpdate credentials or server of an account
POST
/api/v1/users/broker/deletebrokerRemove an account
GET
/api/v1/users/broker/getbrokersList every connected account
POST
/api/v1/users/broker/getdailyprofitDaily profit per account and date range
GET
/api/v1/users/group/getgroupsList copy trading groups
POST
/api/v1/users/group/addgroupbrokerAdd an account to a group with its lot rule
POST
/api/v1/users/group/updategroupbrokerChange multiplier, fixed or balance-based sizing
POST
/api/v1/users/group/updatechildtradingflagPause or resume copying to one account
POST
/api/v1/users/group/removegroupbrokerRemove an account from a group
POST
/api/v1/users/group/getgroupbrokersList accounts in a group

Quick start

Place your first MT5 order

Copy your account token from the dashboard and send one request. type is the MT5 order type (0 = Buy, 1 = Sell, 2 = Buy Limit … 7 = Sell Stop Limit).

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.50,
    "sl": 1.08200,
    "tp": 1.09500
  }'

Master API: onboard an account and add it to a copy group

import requests
BASE = "https://api.algodeltafx.com/api/v1"

# 1. Master token from your AlgoDeltaFX login
res = requests.post(f"{BASE}/auth/userlogin", json={
    "email": EMAIL, "password": PASSWORD, "domain": "https://algodeltafx.com"
}).json()
h = {"Authorization": MASTER_JWT}  # the token returned in res

# 2. Connect a client's MT5 account
requests.post(f"{BASE}/users/broker/addfxbroker", headers=h, json={
    "nic_name": "Client 042", "fx_server": "Exness-MT5Real29",
    "fx_login": 12345678, "fx_password": MT5_PASSWORD, "is_host_based": False
})

# 3. Follow a master group at half size
requests.post(f"{BASE}/users/group/addgroupbroker", headers=h, json={
    "group_id": GROUP_ID, "broker_id": BROKER_ID,
    "is_fix_lot": False, "is_balance_based": False, "multiplier": 0.5
})

MT5 order types

typeOrderDescription
0BuyMarket buy
1SellMarket sell
2Buy LimitBuy at or below a price
3Sell LimitSell at or above a price
4Buy StopBuy when price rises to a level
5Sell StopSell when price falls to a level
6Buy Stop LimitStop that places a buy limit
7Sell Stop LimitStop that places a sell limit

Full request/response schemas, states and error codes are in the API documentation.

What developers build

From a trading bot to a full copy trading business

Trading bots & signal engines

Run your Python or Node strategy anywhere and execute on MT5 through the Account API.

Your own copy trading platform

Use the Master API for onboarding, groups and multipliers behind your own UI. Or go white label.

Fund & MAM dashboards

Pull positions and daily profit for every client account into one reporting view.

Telegram & Discord signal bots

Turn messages into MT5 orders and post fills back to your community.

Risk & compliance monitoring

Watch open exposure across accounts and pause child accounts automatically.

Broker & IB integrations

Connect your CRM or client portal to account onboarding and copy settings.

How it works

From sign-up to first API trade in five minutes

  1. 1

    Sign up

    Create a free AlgoDeltaFX account.

  2. 2

    Connect an MT5 account

    Add your MT5 login, password and broker server in the dashboard.

  3. 3

    Copy your API token

    Copy the account JWT from the dashboard, or request a master token with your AlgoDeltaFX login for the Master API.

  4. 4

    Call the API

    POST to /api/v2/forexaccount/placeorder with an Authorization: Bearer header and the order JSON.

FAQ

Forex API FAQ

What is the AlgoDeltaFX Forex API?

A REST API for MetaTrader 5. The Account API places, modifies and cancels orders, closes positions and reads profile, symbols, open positions and pending orders. The Master API manages many accounts: add or replace MT5 accounts, build copy groups, set multipliers and fetch daily profit.

What is the difference between the Account API and the Master API?

The Account API uses one account's JWT and trades that account. The Master API authenticates as your AlgoDeltaFX user and controls every account and group you own, which is what you need to manage many accounts or build your own platform.

How is the API authenticated?

With JSON Web Tokens (JWT). Account endpoints use an Authorization: Bearer header; the Master API issues a master token from your AlgoDeltaFX login.

Which order types does the API support?

Buy, Sell, Buy Limit, Sell Limit, Buy Stop, Sell Stop, Buy Stop Limit and Sell Stop Limit (order_type 0 to 7), with optional price, stop loss, take profit and stop-limit price.

Can I build my own trading or copy trading platform on the API?

Yes. The Master API exposes account onboarding, group and copy-setting management and reporting, so you can build your own front end. If you want it branded and hosted for you, use the White Label plan.

Is there an MT5 API without running a terminal or VPS?

Yes. AlgoDeltaFX hosts the MT5 connections in the cloud. You call HTTPS endpoints and do not need to run MetaTrader, an EA or a VPS yourself.

Is the API included in the price?

API access is included in every plan, billed per connected account from $8 per month ($7 on the yearly plan). High-volume and white-label usage can be priced on request.

Ready in under 10 minutes

Automate every MT5 account you trade from one place

Copy trading, TradingView webhooks and the API in one platform for $8 per account a month ($7 a month on the yearly plan). No VPS, no commissions, no profit share.

Start free demo · $8/acct