Skip to main content
Glama

fetch_bot_status

Check the current status of open cryptocurrency trades in Freqtrade to monitor active positions and trading bot performance.

Instructions

Retrieve the current status of open trades.

Parameters: ctx (Context): MCP context object for logging and client access.

Returns: str: Stringified JSON response with open trade status, or None if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The fetch_bot_status tool handler function that retrieves the current status of open trades from the Freqtrade bot. It extracts the FtRestClient from the MCP context and calls client.status() to get the trade status, returning it as a stringified JSON response.
    @mcp.tool()
    def fetch_bot_status(ctx: Context) -> str:
        """
        Retrieve the current status of open trades.
        
        Parameters:
            ctx (Context): MCP context object for logging and client access.
        
        Returns:
            str: Stringified JSON response with open trade status, or None if failed.
        """
        client: FtRestClient = ctx.request_context.lifespan_context["client"]
        return str(client.status())
  • __main__.py:76-76 (registration)
    The @mcp.tool() decorator registers the fetch_bot_status function as an MCP tool with the FastMCP framework, making it available for invocation by MCP clients.
    @mcp.tool()

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