Skip to main content
Glama

query_network_stress

Calculate network-level market stress indices by analyzing liquidation intensity, gas costs, and execution failure rates to generate composite risk scores for blockchain networks, supporting DeFi lending risk assessment.

Instructions

Get network-level market stress indices combining liquidation intensity, gas costs, and execution failure rates. Provides a 0-100 composite stress score per blockchain. Useful for macro risk assessment across DeFi lending. Source: Liquidationbot real-time telemetry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoTime window for aggregation (default: 1h)
networkNoFilter by blockchain network

Implementation Reference

  • Handler function for the query_network_stress tool which calls the /api/v1/crypto/risk/networks endpoint.
      async ({ window, network }) => {
        const res = await apiGet<CryptoQueryResponse>(
          "/api/v1/crypto/risk/networks",
          {
            window: window ?? "1h",
            network,
          },
        );
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const summary = `Found ${count} network stress record(s) for window=${window ?? "1h"}.`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Registration of the query_network_stress tool within the server, including its schema definition.
    server.registerTool(
      "query_network_stress",
      {
        title: "Market Stress Indices",
        description:
          "Get network-level market stress indices combining liquidation intensity, " +
          "gas costs, and execution failure rates. Provides a 0-100 composite stress " +
          "score per blockchain. Useful for macro risk assessment across DeFi lending. " +
          "Source: Liquidationbot real-time telemetry.",
        inputSchema: {
          window: z
            .enum(["1h", "24h", "7d"])
            .optional()
            .describe("Time window for aggregation (default: 1h)"),
          network: z
            .enum(["ethereum", "arbitrum", "polygon", "base", "bsc", "avalanche"])
            .optional()
            .describe("Filter by blockchain network"),
        },
      },

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/carrierone/verilexdata-mcp'

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