MetaTrader 5 Market Data API
Pull MetaTrader 5 market data over REST: the broker's symbol list, latest quotes, full contract specifications, OHLC price history for any timeframe, and broker server time. For a continuous tick feed, use the WebSocket prices stream instead of polling.
/mt5/{account_id}/symbolsNames of all symbols available in Market Watch. Use the returned names verbatim with /getQuote, /SymbolInfo, /PriceHistory, and /OrderSend — many brokers suffix their symbols (EURUSD.sd, XAUUSD.r), so discover the exact spelling here instead of assuming plain names. A symbol not in Market Watch can't stream ticks until it's added — a getQuote call enables it on demand.
curl -H "X-API-Key: fxs_live_..." \
https://api.fxsocket.com/mt5/{account_id}/symbols["EURUSD.sd", "GBPUSD.sd", "USDJPY.sd", "XAUUSD.sd", "..."]
/mt5/{account_id}/getQuoteLatest tick for a symbol: the most recent bid, ask, last, volume, and broker server time. If the symbol isn't yet in Market Watch it's enabled on demand, which may add a small delay on the first call. For continuous ticks use the WebSocket prices topic instead.
symbol* — Symbol name as listed by /symbols (e.g. EURUSD, XAUUSD).
curl -H "X-API-Key: fxs_live_..." \
"https://api.fxsocket.com/mt5/{account_id}/getQuote?symbol=EURUSD"{
"symbol": "EURUSD",
"bid": 1.15325,
"ask": 1.15333,
"time": "2026-06-11T08:55:56.728Z",
"last": 0.0,
"volume": 0
}/mt5/{account_id}/PriceHistoryOHLC bars for a symbol and timeframe — one candle per bar in the requested window. MT5 fetches missing history from the broker on demand, so wide ranges on small timeframes can take several seconds. An empty response is normal when the window predates the broker's retained history or covers a closed market.
symbol* — Symbol name as listed by /symbols.timeframe* — MT5 labels (M1, M5, M15, M30, H1, H4, D1, W1, MN1) or human forms (5min, 1h, 1d).from— Inclusive lower bound (broker server time). ISO-8601 or YYYY-MM-DD. Absent → epoch.to— Inclusive upper bound, same formats. Absent → now.
curl -H "X-API-Key: fxs_live_..." \
"https://api.fxsocket.com/mt5/{account_id}/PriceHistory?symbol=EURUSD&timeframe=H1&from=2026-01-01&to=2026-12-31"[{
"time": "2026-06-11T08:00:00Z",
"open": 1.15301,
"high": 1.15348,
"low": 1.15289,
"close": 1.15330,
"tickVolume": 1243,
"realVolume": 0,
"spread": 7
}]/mt5/{account_id}/SymbolInfoContract specification for a symbol: digits, point, spread, contract size, tick size/value, volume min/max/step, trade mode, swap rates, and base/quote/margin currencies. Call this before /OrderSend to validate volumes and round prices to the right precision.
symbol* — Symbol name as listed by /symbols.
curl -H "X-API-Key: fxs_live_..." \
"https://api.fxsocket.com/mt5/{account_id}/SymbolInfo?symbol=EURUSD"{
"symbol": "EURUSD",
"description": "1 Lot= 100,000 EUR",
"digits": 5,
"point": 0.00001,
"tickSize": 0.00001,
"tickValue": 1.0,
"contractSize": 100000.0,
"volumeMin": 0.01,
"volumeMax": 150000.0,
"volumeStep": 0.01,
"stopsLevel": 1,
"freezeLevel": 0,
"spread": 7,
"tradeMode": "Full",
"swapLong": -3.22,
"swapShort": 1.1,
"bid": 1.15324,
"ask": 1.15331,
"currencyBase": "EUR",
"currencyProfit": "USD",
"currencyMargin": "EUR"
}/mt5/{account_id}/ServerTimezoneBroker server time and its offset from UTC. Timestamps across the API are labelled Z but run on broker server time — use utcOffsetSeconds to translate them to real UTC (utc = serverTime − utcOffsetSeconds). Most MetaTrader brokers run on EET (UTC+2, UTC+3 with DST).
curl -H "X-API-Key: fxs_live_..." \
https://api.fxsocket.com/mt5/{account_id}/ServerTimezone{
"serverTime": "2026-06-11T08:55:57.000Z",
"utcOffsetSeconds": 0
}