Skip to main content
Glama
ymylive
by ymylive

compare_funding_rates

Compare current funding rates of a perpetual contract across multiple exchanges to identify arbitrage opportunities and assess market positioning. Returns spread in basis points between highest and lowest rates.

Instructions

Compare the current funding rate for one perp across multiple exchanges, in parallel.

Use this to find funding-rate arbitrage opportunities (long the venue paying you, short the venue charging you) or to gauge how lopsided positioning is across the market. The spread_bps field is (max - min) * 10000 and tells you how big the dispersion is in basis points. For a single exchange snapshot use get_funding_rate; for historical trend on one venue use get_funding_rate_history.

Symbol convention: linear USDT-margined perps use "BTC/USDT:USDT" on most venues. BitMEX's flagship is the inverse contract "BTC/USD:BTC", so if you pass a USDT linear symbol the BitMEX branch will return an error inline — that's expected. Branches that fail (unsupported symbol, geo- block, rate limit) return {"exchange": ..., "error": ...} rather than sinking the whole call.

Args: symbol: CCXT unified perp symbol. Default "BTC/USDT:USDT". exchange_ids: Comma-separated CCXT exchange IDs. Default "binance,okx,bybit,bitmex".

Returns: {"symbol", "rates": [...], "max", "min", "spread_bps", "n_ok", "n_error"}. Each rate row is either {"exchange", "fundingRate", "nextFundingTimestamp", "markPrice"} on success or {"exchange", "error"} on failure. max/min/ spread_bps are populated only when at least two branches returned numeric fundingRate values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNoBTC/USDT:USDT
exchange_idsNobinance,okx,bybit,bitmex
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses that failed branches return error inline, explains spread_bps computation, and warns about BitMEX linear symbol errors. Missing explicit mention of rate limits or authentication, but otherwise thorough.

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

Conciseness4/5

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

Well-structured with bold summary, use cases, symbol details, arguments, and return format. Every sentence adds value; slightly lengthy but appropriate for the complexity.

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

Completeness5/5

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

Given no output schema and 2 simple parameters, description covers all aspects: arguments, failure behavior, return fields. Complete for the tool's complexity.

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

Parameters5/5

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

Input schema has 0% description coverage. Description adds essential meaning: symbol convention (CCXT unified perp), default values, exchange_ids format (comma-separated), and notes about BitMEX. Also describes return structure, fully compensating for schema gaps.

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

Purpose5/5

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

Clearly states verb 'compare' and resource 'funding rates'. Explicitly distinguishes from siblings: 'For a single exchange snapshot use get_funding_rate; for historical trend on one venue use get_funding_rate_history.'

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

Usage Guidelines5/5

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

Provides explicit when-to-use (arbitrage opportunities, lopsided positioning) and when-not-to (single exchange, historical). Includes examples of expected behavior for specific exchanges like BitMEX.

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/ymylive/coin-mcp'

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