INNER CODE UNIT · Python

account_stats

codedpro/mt5-trade-split-manager · mcp_server.py:105

def account_stats():
    """Get MT5 account statistics: balance, equity, margin, free margin, and
    open profit, all in the account's deposit currency. Read-only.
    """
    return _request("GET", "/stats")


@mcp.tool()
def bridge_health():
    """Check that the REST bridge is up and reachable before trading.

    Returns the bridge's health JSON (status, TCP host/port it listens on for
    the EA, and whether API-key auth is required). If the bridge process is
    down this returns "bridge unreachable at <url>". Note: a healthy bridge
    does not guarantee the MT5 EA is connected - that only shows up when a
    command times out.
    """
    return _request("GET", "/health")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…