Documentation

Everything you need to connect accounts and execute trades through the WireMT REST API.

Full Integration Example
Connect, trade, check positions, and close — all in one script
Python
import requests BASE = "https://wiremt-api.newedgeflow.com" HEADERS = { "Content-Type": "application/json", "x-api-key": "wmt_live_your_key_here" } # 1. Connect an MT5 account resp = requests.post(f"{BASE}/v1/connect", json={ "login": 436722880, "password": "your_password", "server": "Exness-MT5Trial9" }, headers=HEADERS) account_id = resp.json()["id"] print(f"Connected: {account_id}") # 2. Execute a trade trade = requests.post(f"{BASE}/v1/trade", json={ "id": account_id, "symbol": "EURUSD", "side": "buy", "volume": 0.01 }, headers=HEADERS) ticket = trade.json()["ticket"] print(f"Trade opened: ticket {ticket}") # 3. Check open positions positions = requests.get( f"{BASE}/v1/positions?id={account_id}", headers=HEADERS ).json() print(f"Open positions: {len(positions)}") # 4. Modify SL/TP requests.post(f"{BASE}/v1/modify", json={ "id": account_id, "ticket": ticket, "sl": 1.08200, "tp": 1.09000 }, headers=HEADERS) # 5. Close the trade requests.post(f"{BASE}/v1/close", json={ "id": account_id, "ticket": ticket }, headers=HEADERS) print("Trade closed")
Copy Trading Platform Example
Mirror a master trade to multiple client accounts (like EdgeFlow)
Python
import requests from concurrent.futures import ThreadPoolExecutor BASE = "https://wiremt-api.newedgeflow.com" HEADERS = {"Content-Type": "application/json", "x-api-key": "wmt_live_your_key_here"} # Your connected client account IDs CLIENTS = [ {"id": "acc_b3ed7fc4b0d84f16", "multiplier": 1.0}, {"id": "acc_6821bbde5dfd489f", "multiplier": 2.0}, {"id": "acc_ac672166e4c84af3", "multiplier": 0.5}, ] def copy_trade(client, symbol, side, base_volume): volume = round(base_volume * client["multiplier"], 2) resp = requests.post(f"{BASE}/v1/trade", json={ "id": client["id"], "symbol": symbol, "side": side, "volume": volume, "comment": "copy-trade" }, headers=HEADERS) return {"client": client["id"], "result": resp.json()} # When master signal fires: fan out to all clients with ThreadPoolExecutor(max_workers=10) as pool: futures = [pool.submit(copy_trade, c, "XAUUSD", "buy", 0.01) for c in CLIENTS] results = [f.result() for f in futures] print(results)
Full Integration Example
JavaScript
const BASE = "https://wiremt-api.newedgeflow.com"; const HEADERS = { "Content-Type": "application/json", "x-api-key": "wmt_live_your_key_here" }; async function main() { // 1. Connect account const conn = await fetch(`${BASE}/v1/connect`, { method: "POST", headers: HEADERS, body: JSON.stringify({ login: 436722880, password: "your_password", server: "Exness-MT5Trial9" }) }).then(r => r.json()); console.log("Connected:", conn.id); // 2. Execute trade const trade = await fetch(`${BASE}/v1/trade`, { method: "POST", headers: HEADERS, body: JSON.stringify({ id: conn.id, symbol: "EURUSD", side: "buy", volume: 0.01 }) }).then(r => r.json()); console.log("Ticket:", trade.ticket); // 3. Get positions const positions = await fetch( `${BASE}/v1/positions?id=${conn.id}`, { headers: HEADERS } ).then(r => r.json()); console.log("Positions:", positions.length); // 4. Close trade await fetch(`${BASE}/v1/close`, { method: "POST", headers: HEADERS, body: JSON.stringify({ id: conn.id, ticket: trade.ticket }) }); console.log("Closed"); } main();
Connect Account
Bash
curl -X POST https://wiremt-api.newedgeflow.com/v1/connect \ -H "Content-Type: application/json" \ -H "x-api-key: wmt_live_your_key_here" \ -d '{"login":436722880,"password":"pw","server":"Exness-MT5Trial9"}'
Execute Trade
Bash
curl -X POST https://wiremt-api.newedgeflow.com/v1/trade \ -H "Content-Type: application/json" \ -H "x-api-key: wmt_live_your_key_here" \ -d '{"id":"acc_b3ed7fc4b0d84f16","symbol":"EURUSD","side":"buy","volume":0.01}'
Close Position
Bash
curl -X POST https://wiremt-api.newedgeflow.com/v1/close \ -H "Content-Type: application/json" \ -H "x-api-key: wmt_live_your_key_here" \ -d '{"id":"acc_b3ed7fc4b0d84f16","ticket":3265792315}'
Get Positions
Bash
curl https://wiremt-api.newedgeflow.com/v1/positions?id=acc_b3ed7fc4b0d84f16 \ -H "x-api-key: wmt_live_your_key_here"