MTContext Docs
Tool Reference

Account

4 tools in this category.

Overview

Account includes 4 tools for this workflow area.

Available tools: get_account_info, get_orders, get_positions, get_trade_history.

Use the parameter tables and examples below as the canonical request contract.

get_account_info

Returns account balance, equity, margin, leverage, and currency.

Parameters

No parameters.

Example Request

{
  "tool": "get_account_info",
  "arguments": {}
}

get_orders

Returns all pending orders. Each order carries expiration (unix epoch seconds, 0 = no expiry) and, on MT5, type_time (the ORDER_TIME_* mode) so an expiry set with modify_pending_order can be verified. Older EA builds omit these fields.

Parameters

No parameters.

Example Request

{
  "tool": "get_orders",
  "arguments": {}
}

get_positions

Returns all open positions with P&L.

Parameters

No parameters.

Example Request

{
  "tool": "get_positions",
  "arguments": {}
}

get_trade_history

Returns closed trades with optional date range filter.

Parameters

NameTypeRequiredDefaultDescription
from_datestringNo——
to_datestringNo——
limitintegerNo100—

Example Request

{
  "tool": "get_trade_history",
  "arguments": {}
}

On this page