Skip to main content

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"
See the full Authentication guide for error handling, code examples, and WebSocket auth details.

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"
  }'
Response
{
  "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"
Response
{
  "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
  }'
Response
{
  "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;
  }
};
ChannelDescriptionsymbols requiredDefault interval
quotesReal-time bid/ask ticksYes500ms
ordersOrder open/modify/close eventsNoinstant
profitLive equity, margin, and P&LNo1000ms
heartbeatAccount health snapshotNo5000ms
new_positionNew position openedNoinstant
See the full WebSocket Guide for alerts, aggregate feed, unsubscribing, and multi-account streaming.

Response Format

Every API response uses this envelope:
{
  "ok": true,
  "data": { ... }
}

Error Codes

CodeHTTPDescription
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Account belongs to another key
ACCOUNT_NOT_FOUND404Account ID does not exist
INVALID_REQUEST400Bad request body or params
ORDER_FAILED422Broker rejected the trade
ACCOUNT_LIMIT_REACHED409Max 4 accounts per key
CONNECTION_FAILED502Could not reach MT5 broker
SESSION_LOST503Broker session dropped
UPSTREAM_ERROR502Broker 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.