Skip to main content
Glama
qeinfinity

Binance MCP Server

get_futures_funding_rate

Retrieve the current funding rate for Binance futures trading pairs to monitor costs and inform trading decisions.

Instructions

Get current funding rate for a futures trading pair

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesTrading pair symbol (e.g., BTCUSDT)

Implementation Reference

  • Core implementation of the get_futures_funding_rate tool. Fetches the current funding rate from the Binance Futures /premiumIndex API endpoint using axios with exponential backoff retry logic.
    public async getFuturesFundingRate(symbol: string): Promise<any> {
      try {
        logger.info(`Getting futures funding rate for ${symbol}`);
        const response = await this.executeWithRetry(() =>
          this.axiosInstance.get(`${config.FUTURES_REST_URL}/premiumIndex`, {
            params: {
              symbol: symbol.toUpperCase()
            }
          })
        );
        logger.info('Successfully fetched funding rate data');
        return response.data;
      } catch (error) {
        logger.error('Error fetching funding rate:', error);
        throw new APIError('Failed to fetch funding rate data', error as Error);
      }
    }
  • src/index.ts:94-107 (registration)
    Tool registration in the ListTools handler, defining the tool name, description, and input schema.
    {
      name: "get_futures_funding_rate",
      description: "Get current funding rate for a futures trading pair",
      inputSchema: {
        type: "object",
        properties: {
          symbol: { 
            type: "string", 
            description: "Trading pair symbol (e.g., BTCUSDT)" 
          }
        },
        required: ["symbol"]
      }
    },
  • MCP server handler for the get_futures_funding_rate tool call. Validates input, delegates to BinanceRestConnector, and formats response.
    case "get_futures_funding_rate": {
      if (!isFuturesDataParams(request.params.arguments)) {
        throw new Error('Invalid futures data parameters');
      }
      const { symbol } = request.params.arguments;
      const data = await restConnector.getFuturesFundingRate(symbol);
      return {
        content: [{
          type: "text",
          text: JSON.stringify(data, null, 2)
        }]
      };
    }
  • TypeScript interface defining the input parameters for futures tools like get_futures_funding_rate.
    export interface FuturesDataParams {
      symbol: string;
    }
  • Type guard function used to validate input parameters for the get_futures_funding_rate tool.
    export function isFuturesDataParams(params: any): params is FuturesDataParams {
      return (
        typeof params === 'object' &&
        typeof params.symbol === 'string'
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this is real-time or delayed data, rate limits, authentication requirements, error conditions, or what format the funding rate is returned in. The description is minimal and lacks important operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point with no unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a financial data tool with no annotations and no output schema, the description is insufficient. It doesn't explain what a funding rate is, how it's calculated, what units it's returned in, or what the response structure looks like. The agent would need to guess about important operational details despite the tool's apparent simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, with the 'symbol' parameter well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline for high schema coverage but doesn't provide extra value like format examples or validation rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get current funding rate') and resource ('for a futures trading pair'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_futures_open_interest' or 'get_market_data', but the specific focus on funding rates provides implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_futures_open_interest' or 'get_market_data'. It doesn't mention prerequisites, timing considerations, or any context about when funding rate data is needed versus other market metrics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/qeinfinity/binance-mcp-server'

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