Skip to main content
Glama

get_funding_rates

Compare funding rates across Pacifica, Hyperliquid, and Lighter exchanges to identify arbitrage opportunities with spread analysis.

Instructions

Compare funding rates across all 3 exchanges (Pacifica, Hyperliquid, Lighter). Returns rates per symbol with spread analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsNoFilter to specific symbols (e.g. ['BTC','ETH']). Omit for all available
minSpreadNoMinimum annualized spread % to include (default: 0)

Implementation Reference

  • The handler for the "get_funding_rates" MCP tool. It calls fetchAllFundingRates to retrieve and aggregate data from the exchanges.
    server.tool(
      "get_funding_rates",
      "Compare funding rates across all 3 exchanges (Pacifica, Hyperliquid, Lighter). Returns rates per symbol with spread analysis",
      {
        symbols: z
          .array(z.string())
          .optional()
          .describe("Filter to specific symbols (e.g. ['BTC','ETH']). Omit for all available"),
        minSpread: z.number().optional().describe("Minimum annualized spread % to include (default: 0)"),
      },
      async ({ symbols, minSpread }) => {
        try {
          const snapshot = await fetchAllFundingRates({ symbols, minSpread });
          return {
            content: [{
              type: "text",
              text: ok(snapshot, { symbolCount: snapshot.symbols.length, exchangeStatus: snapshot.exchangeStatus }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: err(e instanceof Error ? e.message : String(e)) }], isError: true };
        }
      },
    );

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/hypurrquant/perp-cli'

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