API documentation

Market data & history

Quotes, symbols, bars and ticks straight from the broker's terminal, and the account's complete trade history with statistics.

Updated

Which terminal answers

Market data comes from a MetaTrader terminal. The terminal reads on this page (symbols, quotes, market watch, rates, ticks, sessions, server time, mails, trade rights) accept these parameters — summary, positions, orders, deals and stats are account reads and ignore ?source and ?timeout:

  • ?source=auto (default) — the account's own terminal when it is connected, otherwise another connected account of yours on the same broker server. account — only this account. server — another connected account of yours on the same server. The answer names the terminal in sourceAccountId (prices are the same; spreads, margins and swaps may differ between account types).
  • ?wait=N — a STANDBY account (no running terminal) logs in for the read and waits up to N seconds; without it the answer is 409 ACCOUNT_NOT_CONNECTED.
  • ?timeout=N — seconds (2–120) to wait for the terminal; 504 QUERY_TIMEOUT (retryable) after it.
bash
curl "https://api.propmetaapi.com/v1/accounts/$ACCOUNT_ID/quotes?symbols=EURUSD,XAUUSD" -H "Authorization: Bearer $GW_KEY"
{
  "items": [
    { "symbol": "EURUSD", "bid": 1.08410, "ask": 1.08412, "last": 0, "volume": 0, "time": "2026-10-05T09:00:01.250Z",
      "digits": 5, "ageMs": 180, "stale": false }
  ],
  "sourceAccountId": "3f0c2b9e-…"
}
For prices that move, stream them instead of polling: subscribe to quote, ohlc or marketWatch on the WebSocket.

Symbols, prices and terminal reads

RouteAnswer
GET …/symbolsSymbol names (?filter=EUR* with * and ?, ?offset, ?limit) or full specifications (?details=true, or ?symbols=EURUSD,XAUUSD).
GET …/symbols/{symbol}Full specification of one symbol (digits, point, tick size / value, volume min / max / step, stops level …).
GET …/symbols/{symbol}/sessionsQuote and trade sessions per weekday, on the broker clock.
GET …/sessions/status?symbols=Is the trade (or ?kind=quote) session open now, per symbol.
GET …/symbol-groupsSymbol groups from the symbols' paths.
GET …/trade-rights?symbols=Direction, close-only, close-by and order kinds allowed per symbol.
GET …/quotes?symbols=Latest bid / ask / last / volume / time per symbol, with ageMs (and stale with ?maxAgeMs).
GET …/market-watch?symbols=Market-watch rows: bid / ask, day high / low, open, previous close, change.
GET …/tick-values?symbols=Tick value and tick size in account currency (?format=array → [symbol, tickValue, tickSize]).
GET …/margin-required?symbol=&volume=&side=Margin needed for an order (side: BUY, SELL, BUY_LIMIT … SELL_STOP_LIMIT; optional price).
GET …/ratesPrice bars: ?symbol= (or ?symbols= up to 20), ?timeframe= (default H1), [from, to) or ?count= bars back from from. Default range: the last 24 h.
GET …/rates/today?symbols=Today's bars on the broker clock (default M1).
GET …/rates/month?symbols=&year=&month=30 days of bars from a date (default H1).
GET …/rates/high-low?symbol=&from=Highest and lowest price in a range, with their times.
POST …/rates/requestsAsynchronous bars: answers { requestId, status: RUNNING } at once; the result arrives on the WebSocket channel quoteHistory and stays one hour at GET …/rates/requests/{requestId}.
GET …/ticks?symbol=&from=Tick history (MT5 only; ?to, ?limit up to 100000; more: true when cut).
POST …/tick-historyStreams the ticks from { symbol, from } up to now on the WebSocket channel tickHistory in one-hour parts (MT5); DELETE …/tick-history/{symbol} stops it.
GET …/detailsEverything the terminal reports about the account: name, company, leverage, stop-out levels, limits, server time and time zone.
GET …/server-timeBroker clock, its offset from UTC and whether DST is in effect.
GET …/mailsThe terminal's mailbox (new mail also arrives as the event MAIL_RECEIVED).
GET …/rawAccount, server, summary, positions, orders and symbols in one answer (?filter for symbols).
POST …/refreshAsk the terminal for a fresh snapshot (profits) now.

Timeframes: M1, M5, M15, M30, H1, H4, D1, W1, MN1; MT5 also M2, M3, M4, M6, M10, M12, M20, H2, H3, H6, H8, H12 (MT4: 422 NOT_SUPPORTED_ON_PLATFORM). 60 or PERIOD_H1 are accepted as well. Bars carry UTC time and the broker's brokerTime.

bash
curl "https://api.propmetaapi.com/v1/accounts/$ACCOUNT_ID/rates?symbol=EURUSD&timeframe=M15&from=2026-10-01T00:00:00Z&to=2026-10-02T00:00:00Z" \
  -H "Authorization: Bearer $GW_KEY"
{
  "symbol": "EURUSD", "timeframe": "M15", "sourceAccountId": "3f0c…",
  "bars": [
    { "time": "2026-10-01T00:00:00.000Z", "brokerTime": "2026-10-01 03:00:00",
      "open": 1.0841, "high": 1.0846, "low": 1.0838, "close": 1.0843, "tickVolume": 812, "spread": 2 }
  ]
}

Trade history and statistics

The gateway downloads an account's deal history on its first check or activation, stores it and keeps it complete: ACTIVE accounts add new deals as they happen, STANDBY accounts on each check. History reads never return a short list — if the stored history does not reach to yet, an ACTIVE account waits for it, a STANDBY account runs a check, and otherwise the answer is 409 HISTORY_NOT_SYNCED (retryable, with details.syncedUntil). to defaults to now and may be at most 10 s ahead of the gateway clock.

RouteAnswer
GET …/dealsDeal legs in [from, to), oldest first. Filters: symbol, magic, type, entry, positionId, ignoreDepositWithdraw. Cursor paging (nextCursor), or ?sort=profit|volume|symbol / ascending=false / pageNumber with page numbers (total, pages).
GET …/positions/{positionId}/dealsAll legs of one position (cursor paging).
GET …/history/positionsClosed positions (legs grouped per position) whose closing leg is in [from, to), or ?ids=1,2,3; ?open=include|only for open ones too. Each has openTime / closeTime, prices, volume, profit, commission, swap, fee, netProfit and its deals. MT5 netting accounts: a reversal (a DEAL_ENTRY_INOUT deal that passes zero) gives two items with one positionId — the part it closed and the part it opened the other way at the reversal — told apart by openTime.
GET …/closed-orders?limit=The last closed positions, newest first, from the stored history (no sync wait); a netting reversal is two items with one positionId, as in …/history/positions.
GET …/history/ordersOrders that left the terminal (filled, cancelled, expired), read live from the account's terminal; ?state=, ?pendingOnly=true.
GET …/history/statussyncedUntil, fullSynced, complete, lagMs and the number of stored deals.
GET …/statsTrading statistics for [from, to) (win rate, profit factor, drawdown …) in account currency.
GET …/equity-historyBalance / equity points per ?timeframe= (default H1); ?reconstruct=true fills the time before the gateway watched the account from price history.
GET …/stats/equityStatistics plus the equity series.
GET …/stats/unrealizedFloating profit over time and of the open positions now.
GET …/equity-bars?after=One-minute equity bars (open / high / low / close, balance) after a cursor, kept 14 days (410 CURSOR_EXPIRED when older).
GET …/logs?after=Terminal, EA and lifecycle log lines of the last 14 days (?level, ?source).
bash
curl "https://api.propmetaapi.com/v1/accounts/$ACCOUNT_ID/deals?from=2026-09-01T00:00:00Z&to=2026-10-01T00:00:00Z&limit=500" \
  -H "Authorization: Bearer $GW_KEY"
{
  "items": [
    { "id": "41234567", "type": "DEAL_TYPE_BUY", "entryType": "DEAL_ENTRY_IN", "symbol": "EURUSD", "magic": 0,
      "time": "2026-09-02T08:15:03.000Z", "brokerTime": "2026-09-02 11:15:03", "volume": 0.1, "price": 1.0841,
      "commission": -0.35, "swap": 0, "profit": 0, "fee": 0, "positionId": "51234567", "orderId": "51234567", "platform": "mt5" }
  ],
  "nextCursor": "eyJ0Ijoi…",
  "syncedUntil": "2026-10-05T09:00:00.000Z"
}

# 409 when the history does not reach "to" yet (retry after a moment, or pass ?wait=30):
# { "code": "HISTORY_NOT_SYNCED", "retryable": true, "details": { "syncedUntil": "…", "runtimeState": "CONNECTED" } }
History can lag the terminal

History reads (deals, positions, closed positions, stats) answer from the gateway's stored copy of the account's history, so they can run a few seconds behind the terminal. to defaults to now + 1 s. When the stored history does not reach to yet: an ACTIVE account waits until to + 4 s has passed, then asks its terminal for a checkpoint every 2 s until the history covers to — for up to ?wait (default 20 s); an account that is still connecting is waited for up to 20 s (?wait, at most 45 s); a STANDBY account runs a check (one that succeeded in the last 60 s is reused) for up to ?wait (default and maximum 45 s). Otherwise the answer is 409 HISTORY_NOT_SYNCED.

GET …/history/status shows the lag: lagMs = now − syncedUntil, complete = less than 120 s behind. GET …/closed-orders never waits and returns the stored history as it is. The one history read served live by the terminal is GET …/history/orders: fresh, but a terminal round-trip of up to 90 s, always from the account's own terminal (?source is accepted — account, the default, or auto — but another account would return its own history, so it changes nothing; a STANDBY account needs ?wait). Deals, positions and stats take no ?source. DEAL_ADDED on the event feed tells you when a new deal has been stored.

Event feed

Everything that happens on your accounts (order changes, new deals, state changes, finished commands, plan notices …) is appended to one feed with increasing ids, kept 14 days. Read it with a cursor, receive it live on the WebSocket events channel, or have it pushed by webhooks — all three carry the same events.

bash
curl "https://api.propmetaapi.com/v1/events?after=0&limit=500" -H "Authorization: Bearer $GW_KEY"
{ "items": [ { "id": "1843", "type": "DEAL_ADDED", "accountId": "3f0c…", "occurredAt": "…", "dealId": "41234567", … } ],
  "nextAfter": "1843" }

# only some event types (comma-separated); nextAfter still moves past the other types
curl "https://api.propmetaapi.com/v1/events?after=1843&types=DAILY_DRAWDOWN_BREACHED,AUTH_REJECTED" -H "Authorization: Bearer $GW_KEY"

Pagination

StyleRoutesHow
cursorGET /v1/accounts, …/deals (time order), …/history/positions, …/positions/{id}/dealsPass nextCursor as ?cursor= until it is null. Cursors are opaque.
afterGET /v1/events, …/equity-bars, …/logs, /v1/copy/logsPass nextAfter as ?after= next time; it stays the same when nothing new came.
pageNumber…/deals with another sort or descending?pageNumber=1,2,… with ?limit; the answer has total and pages.