Skip to main content
Glama

get_chain_tx_stats

Analyze Bitcoin transaction rate statistics by calculating averages over a specified number of blocks to monitor network activity and usage patterns.

Instructions

Get transaction rate statistics over N blocks.

Args: nblocks: Number of blocks to average over (default 2016 = ~2 weeks)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nblocksNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_chain_tx_stats tool is registered and implemented in src/bitcoin_mcp/server.py. It calls getchaintxstats on the RPC client and returns the result as a JSON-serialized string.
    def get_chain_tx_stats(nblocks: int = 2016) -> str:
        """Get transaction rate statistics over N blocks.
    
        Args:
            nblocks: Number of blocks to average over (default 2016 = ~2 weeks)
        """
        stats = get_rpc().getchaintxstats(nblocks)
        return json.dumps(stats)

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/Bortlesboat/bitcoin-mcp'

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