Skip to main content
Glama

metatrader-mcp-server

get_margin.md520 B
# get_margin 🏦 ## What does it do? Returns the current used margin for your account. ## Parameters - `connection`: The MetaTrader connection object (must be connected!). ## Returns - `float`: Current used margin. ## Raises - `AccountInfoError`: If margin can't be retrieved. - `ConnectionError`: If not connected to the terminal. ## Example ```python margin = get_margin(connection) print(f"Margin used: {margin} 🏦") ``` --- > **Remember:** Margin is what you put up to open trades. Keep an eye on it! 👀

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