Skip to main content
Glama

metatrader-mcp-server

accounts.py821 B
from fastapi import APIRouter, HTTPException, Request router = APIRouter() @router.get("/info", response_model=dict) async def account_info(request: Request): """ Returns a dictionary with basic trade statistics: balance, equity, profit, margin level, free margin, account type, leverage, and currency. Input: None Response: dict: { 'balance': float, 'equity': float, 'profit': float, 'margin_level': float, 'free_margin': float, 'account_type': str, 'leverage': int, 'currency': str } """ client = request.app.state.client try: return client.account.get_trade_statistics() except Exception as e: raise HTTPException(status_code=500, detail=str(e))

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ariadng/metatrader-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server