| list_accountsA | List the accounts authorized for the configured API token. Returns {"accounts": [...]} where each entry has id (the
account identifier every other tool operates on, e.g.
001-001-1234567-001), tags (list of strings), and
mt4AccountID when the account is MT4-bridged. |
| get_accountA | Get the full state of the configured account, trimmed to summary level. Returns {"account": {...}, "lastTransactionID": "..."}. The account
object carries monetary fields as decimal strings in the account's home
currency (balance, NAV, pl, unrealizedPL,
marginUsed, marginAvailable, ...), the leverage setting
marginRate (decimal string, e.g. "0.02" = 50:1), the open-item
counts (openTradeCount, openPositionCount,
pendingOrderCount), and createdTime as an RFC3339 timestamp.
The per-order/trade/position detail lists the API embeds here are
dropped; use the orders, trades, and positions tools for those.
For a cheaper request that yields the same fields, prefer
get_account_summary. |
| get_account_summaryA | Get a summary of the configured account (no order/trade/position lists). Returns {"account": {...}, "lastTransactionID": "..."} with the
same summary fields as get_account — monetary values as decimal
strings in the home currency, marginRate as a decimal string
(e.g. "0.02" = 50:1 leverage), open-item counts, and RFC3339
timestamps. This is the lightest way to check balance, NAV, and margin
headroom. |
| list_account_instrumentsA | List instruments tradeable on the configured account. Returns {"instruments": [...]} where each entry has name
(e.g. EUR_USD), type (CURRENCY, CFD, or METAL),
displayName, pipLocation (power-of-ten exponent of one pip:
-4 means a pip is 0.0001), displayPrecision (the number of
decimal places order prices must be formatted to — use it for the
price of LIMIT/STOP orders or the API rejects them with a
PRICE_PRECISION error), tradeUnitsPrecision (decimal places
allowed in order units), minimumTradeSize (decimal string),
marginRate (decimal string; the margin required per unit, e.g.
"0.05" = 20:1 leverage), and maximumOrderUnits (decimal
string). |
| get_account_changesA | Poll the configured account for state changes since a transaction. Returns {"changes": {...}, "state": {...}, "lastTransactionID": "..."}. changes groups what happened (ordersCreated,
ordersCancelled, ordersFilled, ordersTriggered,
tradesOpened, tradesReduced, tradesClosed, positions,
transactions); state carries the price-dependent snapshot
(account unrealizedPL, NAV, marginUsed, plus per-trade,
per-position, and per-order dynamic state). Feed the returned
lastTransactionID back as since_transaction_id on the next
call. Timestamps are RFC3339; monetary values are decimal strings. |
| get_candlesA | Fetch OHLC candles for an instrument. Specify either count (most recent N candles) or an RFC3339
from_time/to_time range; count cannot be combined with both
range bounds. A single request returns at most 5000 candles — for
longer ranges, paginate by setting from_time to the exact time
of the last candle received (not past it, or one candle is silently
skipped) and include_first to false (note the excluded first
candle still counts against count, so a full follow-up page holds
one candle fewer). Returns instrument, granularity and candles: each candle
has an RFC3339 time, volume (number of price ticks, an
integer), complete (false means the candle is still forming — skip
it for analysis), and o/h/l/c prices as decimal strings (flattened for
a single price component, nested under mid/bid/ask when
several components are requested). |
| get_order_bookA | Fetch the aggregate pending-order book for an instrument. Snapshots are produced periodically, not per-tick. Returns time
(RFC3339), the snapshot price and bucketWidth (decimal
strings), and buckets trimmed to at most depth buckets on each
side of the current price. Each bucket has a price and
longCountPercent/shortCountPercent — the percentage of pending
long/short orders at that price, as decimal strings (e.g. "0.2543"
means 0.2543%). |
| get_position_bookA | Fetch the aggregate open-position book for an instrument. Same shape as the order book, but each bucket's
longCountPercent/shortCountPercent (decimal strings, e.g.
"0.2543" means 0.2543%) describe open positions held at that price
rather than pending orders. Returns time (RFC3339), the snapshot
price and bucketWidth (decimal strings), and buckets
trimmed to at most depth buckets on each side of the current price. |
| get_pricingA | Get the current price for one or more instruments. Returns {"time": ..., "prices": [...]} with one entry per requested
instrument: instrument, time (RFC3339 timestamp of the quote),
tradeable (false outside trading hours or when the market is
halted), bid and ask (best available prices, decimal strings;
null when that side has no liquidity), and spread (ask minus bid as
a number in price units; null when either side is missing). |
| get_latest_candlesA | Get the most recent candle for each requested instrument/granularity. Returns {"latest_candles": [...]} with one entry per specification:
instrument, granularity, and candles — each candle carries
time (RFC3339), complete (false means the candle is still
forming), volume (number of price ticks), and an o/h/l/
c object per requested price side (bid/mid/ask) with
prices as decimal strings. |
| list_ordersA | List orders on the configured account, most recent first. Returns {"orders": [...], "lastTransactionID": "..."}. Each order
carries id, type (e.g. MARKET, LIMIT, STOP,
MARKET_IF_TOUCHED, TAKE_PROFIT, STOP_LOSS,
TRAILING_STOP_LOSS), instrument, units (signed decimal
string: positive = long, negative = short), price (decimal
string), state (PENDING, FILLED, TRIGGERED, or
CANCELLED), timeInForce, createTime (RFC3339), and — where
applicable — fill/cancel bookkeeping and attached
takeProfitOnFill/stopLossOnFill/trailingStopLossOnFill
details. |
| list_pending_ordersA | List every pending (not yet filled or cancelled) order on the account. Returns {"orders": [...], "lastTransactionID": "..."} with the
same per-order fields as list_orders: id, type,
instrument, units (signed decimal string), price (decimal
string), timeInForce, createTime (RFC3339), and any attached
on-fill details. |
| get_orderA | Get a single order by ID or client-assigned ID. Returns {"order": {...}, "lastTransactionID": "..."} with the same
fields as list_orders entries: id, type, instrument,
units (signed decimal string), price (decimal string),
state (PENDING, FILLED, TRIGGERED, CANCELLED),
timeInForce, RFC3339 timestamps, and fill/cancel bookkeeping such
as tradeOpenedID or cancellingTransactionID when present. |
| list_tradesA | List trades on the configured account, most recent first. Returns {"trades": [...], "lastTransactionID": "..."}. Each trade
has id, instrument, price (entry fill, decimal string),
openTime (RFC3339), state, initialUnits and
currentUnits (decimal strings whose sign gives direction:
positive = long, negative = short), realizedPL, unrealizedPL,
marginUsed (decimal strings in the account's home currency), and —
when attached — the dependent orders takeProfitOrder,
stopLossOrder, and trailingStopLossOrder (each with id and
price or distance). Closed trades additionally carry
averageClosePrice and closeTime. |
| list_open_tradesA | List every open trade on the configured account. Returns {"trades": [...], "lastTransactionID": "..."} with the
same trade shape as list_trades: id, instrument, price
(entry fill, decimal string), openTime (RFC3339),
currentUnits (decimal string; positive = long, negative = short),
unrealizedPL and marginUsed (decimal strings in the home
currency), and any attached takeProfitOrder, stopLossOrder,
or trailingStopLossOrder. |
| get_tradeA | Get the details of a single trade on the configured account. Returns {"trade": {...}, "lastTransactionID": "..."} where the
trade has id, instrument, price (entry fill, decimal
string), openTime (RFC3339), state (OPEN, CLOSED, or
CLOSE_WHEN_TRADEABLE), initialUnits / currentUnits
(decimal strings; positive = long, negative = short), realizedPL,
unrealizedPL, marginUsed, financing (decimal strings in
the home currency), any attached takeProfitOrder /
stopLossOrder / trailingStopLossOrder, and — for closed
trades — averageClosePrice and closeTime. |
| list_positionsA | List every position the account has ever held, one per instrument. Includes flat positions kept for their lifetime P/L; use
list_open_positions for current exposure only. Returns
{"positions": [...], "lastTransactionID": "..."} where each
position has instrument, lifetime realized pl,
unrealizedPL, marginUsed, financing (all decimal strings
in the account's home currency), and a long and short side.
Each side has units (decimal string; positive on the long side,
negative on the short side, "0" when flat), averagePrice
(only while open), tradeIDs (the open trades composing the side),
pl, and unrealizedPL. |
| list_open_positionsA | List the account's open positions — instruments with at least one open trade. Returns {"positions": [...], "lastTransactionID": "..."} with the
same shape as list_positions: per instrument, realized pl,
unrealizedPL, marginUsed, financing (decimal strings in
the home currency), and long/short sides carrying units
(decimal string; negative on the short side), averagePrice,
tradeIDs, pl, and unrealizedPL. |
| get_positionA | Get the account's position for one instrument (open or flat). Returns {"position": {...}, "lastTransactionID": "..."}. The
position has instrument, lifetime realized pl,
unrealizedPL, marginUsed, financing (decimal strings in
the home currency), and long/short sides with units
(decimal string; negative on the short side, "0" when flat),
averagePrice (only while open), tradeIDs, pl, and
unrealizedPL. Requesting an instrument the account has never
traded fails with HTTP 404. |
| list_transactionsA | List the account's transaction pages for a time range. Note the API quirk: this endpoint returns page links, not the
transactions themselves. The response is {"from": ..., "to": ..., "pageSize": ..., "count": ..., "pages": [...], "lastTransactionID": "..."} where count is the total number of
matching transactions and each entry in pages is a URL of the form
.../transactions/idrange?from=<id>&to=<id> covering at most
page_size transactions. To fetch the actual transactions, take the
from/to IDs out of a page URL and call
get_transactions_range. Timestamps are RFC3339. |
| get_transactionA | Get the details of a single transaction. Returns {"transaction": {...}, "lastTransactionID": "..."}. Every
transaction has id, time (RFC3339), and type
(e.g. ORDER_FILL, MARKET_ORDER, ORDER_CANCEL,
DAILY_FINANCING, TRANSFER_FUNDS); the remaining fields depend
on the type. Monetary values (pl, financing, commission,
accountBalance, amount) and units/price are decimal
strings; units is signed (positive = long, negative = short).
Internal bookkeeping fields (request/batch IDs, conversion factors)
are dropped. |
| get_transactions_rangeA | Get the transactions in an inclusive ID range. This is the endpoint that returns actual transactions — use it with
the ID ranges from list_transactions page links, or directly when
you know the IDs. Returns {"transactions": [...], "lastTransactionID": "..."}; each transaction carries id,
time (RFC3339), type, and its type-specific fields (see
get_transaction). Monetary values and units/price are
decimal strings; units is signed (positive = long, negative =
short). Keep ranges modest — the API serves at most 1000 transactions
per request. |