CPlugin
Operational since 2015 · hundreds of MT4 / MT5 servers integrated

The MT4 / MT5 API
that just works.

A RESTful JSON Web API to manage MT4 and MT5 trading servers from any HTTP-enabled client. REST for request / response, SignalR over WebSockets / Long Polling / SSE for realtime quotes, margins and trade events. OAuth 2.0, geographically distributed, auto-failover.

REST + SignalR · OAuth 2.0 · Multi-region
auth-and-call.sh
# 1. OAuth Client Credentials → Bearer JWT
TOKEN=$(curl -s -X POST https://auth.cplugin.net/connect/token \
  -d 'grant_type=client_credentials&scope=webapi' \
  -d "client_id=$CPLUGIN_CLIENT_ID" \
  -d "client_secret=$CPLUGIN_CLIENT_SECRET" \
  | jq -r .access_token)

# 2. List your trade platforms
curl -H "Authorization: Bearer $TOKEN" \
  https://cloud.mywebapi.com/api/TradePlatforms

# 3. Ping one of them
curl -H "Authorization: Bearer $TOKEN" \
  https://cloud.mywebapi.com/api/TradePlatforms/$ID/Ping
Documentation

One source of truth, ReDoc

Full MT4 / MT5 ManagerAPI surface — Organizations, TradePlatforms, MT4ManagerAPI, MT5ManagerAPI. Same docs apply to Production and Sandbox environments.

RESTful WebAPI · ReDoc

Browse endpoints with request / response schemas, types, examples.

View ReDoc

Swagger UI remains available, deprecated and slated for removal. · Test methods (no auth) ↗

New · Beta Now running in test mode

Meet the v2 API

A faster, cleaner endpoint surface is live for testing. v2 puts the version in the path — call /api/v2/… directly, no query string — and serves responses through a zero-reflection JSON pipeline. v1 stays stable and fully supported; migrate at your own pace.

Versioning
Version in the path

Call /api/v2/… directly — no api-version query parameter to remember.

Performance
Faster JSON

Source-generated serialization, zero runtime reflection — lower latency and allocations per response.

Realtime
New v2 hub

Hub /hubs/mt4/v2 streams ticks, margins and trade events.

Read the v2 docs Beta — surface may still change before it’s promoted to stable.
MT4 · x86 sidecar Companion instance · 32-bit only

Need the 32-bit MT4 methods?

A handful of MT4 ManagerAPI calls must run inside a 32-bit process against the original mtmanapi.dll. They are served by a separate companion host at the same /api/v2/MT4/{tradePlatform}/… path, with the same OAuth bearer token and the same tradePlatform id. Everything else — MT5, the full MT4 surface, SignalR realtime — stays on this main API.

Served on the sidecar
  • ·Messaging — NewsSend, MailSend, MailsRequest
  • ·Plugins — PluginsGet, PluginParamGet, PluginUpdate, CfgRequestPlugin, CfgUpdatePlugin
  • ·Batch snapshots — UsersSnapshot, UsersSyncRead, TradesSnapshot, TradesSyncRead
  • ·Plugin commands — ExternalCommandBinary
Open the x86 sidecar x86 method reference ↗ Only call these on the sidecar — the main API returns 404 for them by design.
Environments

Two environments, one API

Same surface, same OAuth flow, just different hosts. Sandbox is fully separated — no billing, no SLA, safe to break.

Production Billed · SLA

Multi-region cloud (m2 / m3 / m4 / m9), DNS traffic manager routes to the nearest instance. Your pricing in Toolbox ↗

Sandbox Free · No SLA

Fully separated environment with its own Toolbox for client and MT4 / MT5 connection management. No charges, no SLA, may be reset without notice. Use for integration testing before pointing at Production.

Realtime over SignalR

Hub /hubs/mt4/v1. Subscribe to ticks, margins, trade events. WebSockets / Long Polling / SSE — same code path. Auto-reconnect, bearer auth, typed contracts.

Working examples

Full source for download. Plug in your credentials, run, ship.

Live status
Production
cloud.mywebapi.com
checking…
Sandbox
pre.mywebapi.com
checking…