Base URL
https://api.easierprop.com
Authentication
All requests require an API key prefixed with sk_. Pass it via header, bearer token, or query parameter (WebSocket only).
curl -H "X-API-Key: sk_your_key" "https://api.easierprop.com/api/accounts"
Step 1: Register Your MT5 Account
curl -X POST https://api.easierprop.com/api/accounts \
-H "X-API-Key: sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"label": "My Broker Account",
"broker_host": "mt5.broker.com",
"broker_port": 443,
"mt5_login": 51234567,
"password": "YourMT5Password"
}'
{
"ok": true,
"data": {
"id": "70f60784-20f1-45ba-9a04-8e01c0b810c3",
"label": "My Broker Account",
"broker_host": "mt5.broker.com",
"broker_port": 443,
"mt5_login": 51234567,
"is_enabled": true,
"auto_connect": false,
"session_status": "disconnected",
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:00Z"
}
}
Credentials are encrypted at rest with AES-256-GCM. The password is never returned in API responses.
Step 2: Connect to the Broker
curl -X POST https://api.easierprop.com/api/accounts/70f60784-.../connect \
-H "X-API-Key: sk_your_key"
{
"ok": true,
"data": {
"account_id": "70f60784-20f1-45ba-9a04-8e01c0b810c3",
"connected": true
}
}
You can skip this step. All endpoints auto-connect when needed. Sessions are health-checked every 30s with automatic reconnection.
Step 3: Place a Trade
curl -X POST https://api.easierprop.com/api/accounts/70f60784-.../orders \
-H "X-API-Key: sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"symbol": "EURUSD",
"side": "buy",
"type": "market",
"volume": 0.01
}'
{
"ok": true,
"data": {
"ticket": 12345678,
"symbol": "EURUSD",
"orderType": "Buy",
"lots": 0.01,
"openPrice": 1.08542,
"stopLoss": 0.0,
"takeProfit": 0.0,
"profit": 0.0,
"swap": 0.0,
"commission": -0.07
}
}
Supported order types: market, limit, stop, stop_limit.
Step 4: Stream Live Data
Connect via WebSocket and subscribe to real-time channels:
const ws = new WebSocket("wss://api.easierprop.com/ws?apiKey=sk_your_key");
ws.onopen = () => {
ws.send(JSON.stringify({
type: "subscribe",
channel: "quotes",
account_id: "70f60784-20f1-45ba-9a04-8e01c0b810c3",
symbols: ["EURUSD", "GBPUSD"],
interval_ms: 500
}));
ws.send(JSON.stringify({
type: "subscribe",
channel: "profit",
account_id: "70f60784-20f1-45ba-9a04-8e01c0b810c3",
interval_ms: 1000
}));
ws.send(JSON.stringify({
type: "subscribe",
channel: "heartbeat",
account_id: "70f60784-20f1-45ba-9a04-8e01c0b810c3"
}));
};
ws.onmessage = (e) => {
const msg = JSON.parse(e.data);
switch (msg.type) {
case "quote":
console.log(`${msg.data.symbol}: ${msg.data.bid} / ${msg.data.ask}`);
break;
case "profit":
console.log(`Equity: ${msg.data.equity} | P&L: ${msg.data.profit}`);
break;
case "heartbeat":
console.log(`Balance: ${msg.balance} | Positions: ${msg.position_count}`);
break;
}
};
| Channel | Description | symbols required | Default interval |
|---|
quotes | Real-time bid/ask ticks | Yes | 500ms |
orders | Order open/modify/close events | No | instant |
profit | Live equity, margin, and P&L | No | 1000ms |
heartbeat | Account health snapshot | No | 5000ms |
new_position | New position opened | No | instant |
See the full
WebSocket Guide for alerts, aggregate feed, unsubscribing, and multi-account streaming.
Every API response uses this envelope:
{
"ok": true,
"data": { ... }
}
Error Codes
| Code | HTTP | Description |
|---|
UNAUTHORIZED | 401 | Missing or invalid API key |
FORBIDDEN | 403 | Account belongs to another key |
ACCOUNT_NOT_FOUND | 404 | Account ID does not exist |
INVALID_REQUEST | 400 | Bad request body or params |
ORDER_FAILED | 422 | Broker rejected the trade |
ACCOUNT_LIMIT_REACHED | 409 | Max 4 accounts per key |
CONNECTION_FAILED | 502 | Could not reach MT5 broker |
SESSION_LOST | 503 | Broker session dropped |
UPSTREAM_ERROR | 502 | Broker service error |
Next Steps
REST API Reference
Browse all 40+ endpoints with the interactive playground.
WebSocket Guide
Real-time channels, alerts, aggregate feed, and multi-account streaming.