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
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | No | Filter to specific symbols (e.g. ['BTC','ETH']). Omit for all available | |
| minSpread | No | Minimum annualized spread % to include (default: 0) |
Implementation Reference
- src/mcp-server.ts:126-149 (handler)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 }; } }, );