Skip to main content
Glama

fetch_blacklist

Retrieve the current list of prohibited trading pairs from the Freqtrade cryptocurrency trading bot to avoid restricted assets during automated trading operations.

Instructions

Get the current blacklist of trading pairs.

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

Returns: str: Stringified JSON response with blacklist data, or None if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The fetch_blacklist tool handler function that retrieves the current blacklist of trading pairs from the Freqtrade API. It accesses the FtRestClient from the MCP context and calls the blacklist() method to fetch the data, returning it as a stringified JSON response.
    def fetch_blacklist(ctx: Context) -> str:
        """
        Get the current blacklist of trading pairs.
        
        Parameters:
            ctx (Context): MCP context object for logging and client access.
        
        Returns:
            str: Stringified JSON response with blacklist data, or None if failed.
        """
        client: FtRestClient = ctx.request_context.lifespan_context["client"]
        return str(client.blacklist())
  • __main__.py:146-146 (registration)
    The @mcp.tool() decorator registers the fetch_blacklist function as an MCP tool with the FastMCP server instance 'mcp'.
    @mcp.tool()
  • The docstring defines the tool's input/output schema: accepts a Context parameter and returns a stringified JSON response containing blacklist data.
    """
    Get the current blacklist of trading pairs.
    
    Parameters:
        ctx (Context): MCP context object for logging and client access.
    
    Returns:
        str: Stringified JSON response with blacklist data, or None if failed.

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