Skip to main content
Glama

fetch_backtest_status

Check the execution status and retrieve the latest results of a cryptocurrency trading strategy backtest in Freqtrade.

Instructions

Get current backtest execution status and latest result payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for 'fetch_backtest_status' tool. Decorated with @mcp.tool(), it retrieves the backtest execution status by calling _client_get with the 'backtest' endpoint. Takes a Context parameter and returns the result as a string.
    @mcp.tool()
    def fetch_backtest_status(ctx: Context) -> str:
        """Get current backtest execution status and latest result payload."""
        client: FtRestClient = ctx.request_context.lifespan_context["client"]
        return str(_client_get(client, "backtest"))
  • Core helper function that dynamically calls client methods with fallback support for multiple freqtrade-client versions. Used by _client_get to make HTTP requests.
    def _call_client_method(client: FtRestClient, method_names: List[str], *args, **kwargs):
        """Call first matching client method to support multiple freqtrade-client versions."""
        for method_name in method_names:
            method = getattr(client, method_name, None)
            if callable(method):
                return method(*args, **kwargs)
        raise AttributeError(f"No supported method found in {method_names}")
  • Helper function that wraps _call_client_method for making HTTP GET requests to the freqtrade client. Used by fetch_backtest_status to retrieve backtest status.
    def _client_get(client: FtRestClient, path: str, params: Dict[str, Any] | None = None):
        return _call_client_method(client, ["_get"], path, params=params)

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/worlddebugger/freqtrade-mcp'

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