Skip to main content
Glama

metatrader-mcp-server

get_total_deals.md829 B
# get_total_deals 🔢 **Signature:** ```python def get_total_deals( connection, from_date: Optional[datetime] = None, to_date: Optional[datetime] = None ) -> int ``` ## What does it do? Counts the total number of deals in your MetaTrader 5 history. Useful for stats and sanity checks! 🧮 ## Parameters - **connection**: Your MetaTrader 5 connection object (must be connected!) - **from_date**: Start date for history (default: 30 days ago) - **to_date**: End date for history (default: now) ## Returns - **int**: Total number of deals. ## Raises - `ConnectionError` if not connected - `DealsHistoryError` if MetaTrader 5 errors occur ## Example Usage ```python from metatrader_client.history import get_total_deals total = get_total_deals(conn) ``` --- ✨ _If you get zero, maybe widen your date range!_

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