MT5 — Market data
Get current price
GET /api/external/instances/{accountId}/price/{symbol}
curl -s "$ATLAS_BASE_URL/api/external/instances/5012345/price/EURUSD" \
-H "Authorization: Bearer $ATLAS_API_KEY"
{ "success": true, "data": { "symbol": "EURUSD", "bid": 1.08540, "ask": 1.08552, "last": 0, "volume": 0, "timestamp": 1716631200000 } }
List tradable symbols
GET /api/external/instances/{accountId}/symbols
Returns a bare string[] of symbol names.
curl -s "$ATLAS_BASE_URL/api/external/instances/5012345/symbols" \
-H "Authorization: Bearer $ATLAS_API_KEY"
Get symbol contract specs
GET /api/external/instances/{accountId}/symbols/specs
Superset of /symbols: one object per symbol carrying the full MT5 contract
specification (contract size, volume min/max/step, tick size/value, currencies,
digits, point, trade/calc mode). Values are raw MT5 numbers — derive pip size
and lot value yourself from point + digits. Use this over /symbols when you
need to size forex/CFD positions (gold, metals, index CFDs have contract sizes
other than 100k).
Coverage: specs cover the broker's full symbol catalog (all FX pairs,
metals, indices, crypto — typically several hundred), not just what's visible in
the terminal's Market Watch. One caveat: tickValue is best-effort — MT5 reports
it only for symbols currently in Market Watch and returns 0 otherwise. The
critical fields (contractSize, digits, point, volumeMin/Max/Step,
tickSize, currencies) populate correctly for every symbol; derive pip size and
lot value from point + digits + contractSize.
curl -s "$ATLAS_BASE_URL/api/external/instances/5012345/symbols/specs" \
-H "Authorization: Bearer $ATLAS_API_KEY"
{
"success": true,
"data": [
{
"symbol": "XAUUSD",
"description": "Gold vs US Dollar",
"path": "Metals\\XAUUSD",
"baseCurrency": "XAU",
"profitCurrency": "USD",
"marginCurrency": "USD",
"digits": 2,
"point": 0.01,
"contractSize": 100,
"volumeMin": 0.01,
"volumeMax": 100.0,
"volumeStep": 0.01,
"tickSize": 0.01,
"tickValue": 1.0,
"stopsLevel": 0,
"tradeMode": 4,
"calcMode": 0
}
]
}
Get historical candles
GET /api/external/instances/{accountId}/candles
| Query param | Required | Notes |
|---|---|---|
symbol | ✅ | e.g. EURUSD |
timeframe | ✅ | MT5 format: M1 M2 M3 M4 M5 M6 M10 M12 M15 M20 M30 H1 H2 H3 H4 H6 H8 H12 D1 W1 MN1 |
startTime + endTime | ✅* | ISO 8601 (e.g. 2026-01-01T00:00:00Z) |
count | ✅* | Number of most-recent candles |
* Provide either startTime + endTime or count.
curl -s -G "$ATLAS_BASE_URL/api/external/instances/5012345/candles" \
-H "Authorization: Bearer $ATLAS_API_KEY" \
--data-urlencode "symbol=EURUSD" \
--data-urlencode "timeframe=H1" \
--data-urlencode "count=200"
{
"success": true,
"data": [
{ "time": "2026-05-25T09:00:00.000Z", "open": 1.0840, "high": 1.0858, "low": 1.0835, "close": 1.0851, "tickVolume": 1234, "spread": 1 }
]
}
Calculate margin
POST /api/external/instances/{accountId}/margins
| Field | Type | Required | Notes |
|---|---|---|---|
symbol | string | ✅ | |
type | enum | ✅ | ORDER_TYPE_BUY, ORDER_TYPE_SELL, ORDER_TYPE_*_LIMIT, ORDER_TYPE_*_STOP (note the ORDER_TYPE_ prefix) |
volume | number | ✅ | > 0 |
openPrice | number | ✅ | > 0 |
curl -s -X POST "$ATLAS_BASE_URL/api/external/instances/5012345/margins" \
-H "Authorization: Bearer $ATLAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "symbol": "EURUSD", "type": "ORDER_TYPE_BUY", "volume": 0.10, "openPrice": 1.0850 }'
{ "success": true, "data": { "margin": 21.7, "currency": "USD" } }