Connect MetaTraderAPI to Your AI Agent

Select a trading session and ask AI to organize the account’s open positions and recent executed deals.

15 tools API key

Try a MetaTraderAPI Task

Copy a prompt into your agent with the oo Skill installed. Add your page links and source notes before running it.

oo Skill MetaTraderAPI

Summarize open positions and trade history

Read open positions and executed deals over a chosen period.

/oo MetaTraderAPI: For MetaTraderAPI session [ID], read account information, open positions, and executed deals from [start date] to [end date]. Summarize available balances, exposures, and realized deal results.

Start Working with MetaTraderAPI

  1. Install OOMOL

    Set up oo CLI and the oo Skill in your agent.

    Install OOMOL →
  2. Connect MetaTraderAPI

    Connect a MetaTraderAPI API key. Account reads require an active trading session.

    Connect MetaTraderAPI →
  3. Give Your Agent a Task

    Use /oo with the pages to read, the changes to make, and where to save the result.

    Connection Guide →

Choose Your Agent

  • A MetaTraderAPI API key.
  • An active session, or your MT4/MT5 account login, password, broker server, and platform to start one.

MetaTraderAPI Tools

The connection starts and stops MT4 or MT5 sessions and reads account data, positions, pending orders, history, and symbols. It does not place trades.

Account and trading records

Read account information, equity, margin, positions, pending orders, and historical deals.

15 tools

List Sessions

List all active MetaTraderAPI sessions for the authenticated account.

metatraderapi.list_sessions

Start Session

Start a MetaTraderAPI session connected to an MT4 or MT5 trading account.

metatraderapi.start_session

Stop Session

Stop one active MetaTraderAPI session.

metatraderapi.stop_session

Close All Sessions

Stop all active MetaTraderAPI sessions for the authenticated account.

metatraderapi.close_all_sessions

Get Account Info

Get balance, equity, margin, leverage, currency, and other account information.

metatraderapi.get_account_info

Get Equity

Get the current equity, balance, profit, and currency for a session.

metatraderapi.get_equity

List Deals

List executed deals from the MetaTrader account history.

metatraderapi.list_deals

List History Orders

List historical MetaTrader orders, including canceled and expired orders.

metatraderapi.list_history_orders

Get Margin

Get the current margin and free-margin information for a session.

metatraderapi.get_margin

List Orders

List pending orders for a MetaTraderAPI session.

metatraderapi.list_orders

Ping Session

Ping a MetaTraderAPI session to check whether it is responsive.

metatraderapi.ping_session

List Positions

List current open positions for a MetaTraderAPI session.

metatraderapi.list_positions

Get Session Status

Get the activity, health, and MetaTrader connection status of a session.

metatraderapi.get_session_status

List Symbols

List trading symbols available to a MetaTraderAPI session.

metatraderapi.list_symbols

Get Symbol

Get current prices, spread, contract size, and volume limits for a symbol.

metatraderapi.get_symbol

Frequently Asked Questions

How do I obtain a session ID?

List active sessions or start one using the trading account login, password, broker server, and MT4 or MT5 platform.

Are pending orders the same as executed deals?

No. Pending orders are current orders; executed deals come from account history. Historical orders also include canceled and expired orders.

Can this connection open or close trades?

The exposed operations read trading records and manage sessions; trade placement and closure are not included.

Connect MetaTraderAPI

About MetaTraderAPI ↗