OrderFill

Market data

Quotes, candles, instrument specs and your fills.

Symbols in the path can be canonical (XAUUSD) or the broker's own name.

GET /v1/accounts/:id/quotes/:symbol

{ "quote": { "symbol": "EURUSD", "brokerSymbol": "EURUSDm", "bid": 1.0841, "ask": 1.0842, "time": 1759225600000 } }

For prices that change while you watch, subscribe to ticks instead of calling this in a loop.

GET /v1/accounts/:id/candles/:symbol

Query
timeframeRequired. M1 M5 M15 M30 H1 H4 D1 W1.
from, toOptional. Unix milliseconds or ISO 8601. Default: the last 24 hours.
countOptional. The latest N candles, newest last, instead of a range. Not with from/to.
{ "candles": [ { "time": 1759225600000, "open": 2400, "high": 2405, "low": 2399, "close": 2403, "volume": 120 } ] }

At most 5,000 candles per call; page with from and to for more.

POST /v1/accounts/:id/margin

The margin an order would tie up, in the account currency. Needs only a read key.

Field
symbol, side, volumeRequired, as for an order.
priceOptional. The current price on that side when omitted.
{ "margin": 241.18, "price": 2411.8 }

POST /v1/accounts/:id/profit

The profit or loss between two prices, in the account currency. The way to size a stop from a risk amount. Needs only a read key.

// { "symbol": "XAUUSD", "side": "buy", "volume": 0.1, "open": 2400, "close": 2390 }
{ "profit": -100 }

GET /v1/accounts/:id/instruments

Contract details for every symbol on the account.

{
  "instruments": [
    { "symbol": "XAUUSD", "brokerSymbol": "XAUUSDm", "description": "Gold vs US Dollar",
      "digits": 2, "minVolume": 0.01, "maxVolume": 100, "volumeStep": 0.01,
      "contractSize": 100, "tickSize": 0.01, "tickValue": 1,
      "swapLong": -1.5, "swapShort": 0.4,
      "baseCurrency": "XAU", "profitCurrency": "USD", "marginCurrency": "XAU", "tradable": true }
  ]
}

contractSize is the units in one lot. tickValue is what a move of tickSize is worth for one lot, in the account currency: a stop 500 ticks away on 0.1 lots risks 500 × tickValue × 0.1.

GET /v1/accounts/:id/executions

Your fills, including closes. from and to as for candles; the last 24 hours by default.

{
  "executions": [
    { "id": "5000013", "ticket": "4737871287", "symbol": "XAUUSD", "brokerSymbol": "XAUUSDm",
      "side": "sell", "volume": 0.1, "price": 2413.4, "profit": 15.8,
      "commission": -0.7, "swap": 0, "fee": 0, "entry": "out", "orderTicket": "4737871301",
      "at": 1759229200000 }
  ]
}

A fill's true result is profit + commission + swap + fee. entry is in for a fill that opened a position, out for one that closed it, inout for a reversal.

GET /v1/accounts/:id/capabilities

What this account's platform supports. Answering never connects the account.

{
  "capabilities": { "quotes": true, "candles": true, "ticks": true, "executions": true,
                    "pendingOrders": true, "orderCheck": true, "closeFilters": true, "rawSymbols": true,
                    "modifyOrder": true, "health": true, "calc": true }
}

Every MetaTrader 5 account has all of them today. A call that needs one an account lacks returns 501 not_supported, with details.capability naming it.

On this page