Skip to main content
Glama
ymylive
by ymylive

get_funding_rate_history

Retrieve historical funding rate time-series for a perpetual contract on one exchange to analyze funding trends, identify turning points, measure negative funding duration, detect cycles, or feed into quant signals.

Instructions

Get historical funding-rate time-series for a perpetual contract on one exchange.

Use this for trend analysis on funding — "is funding turning positive?", "how long has BTC funding been negative?", spotting funding cycles, or feeding a series into a quant signal. For the single most-recent snapshot use get_funding_rate. For a cross-exchange comparison of the current rate use compare_funding_rates.

The funding interval varies by venue: Binance and OKX charge funding every 8 hours, Bybit every 1 hour for some perps, BitMEX every 8 hours, etc. Returned timestamps reflect each charge. Don't assume a uniform cadence when comparing series across exchanges.

Args: exchange_id: CCXT exchange ID supporting perps, e.g. "binance", "okx", "bybit", "bitmex", "bitget", "bingx", "gate", "mexc", "kucoinfutures", "hyperliquid". symbol: Perp symbol with settle suffix. Linear (USDT-margined): "BTC/USDT:USDT". Inverse (coin-margined): "BTC/USD:BTC". since_ms: Optional unix-millis lower bound. If null, the exchange returns its default window (typically the most-recent N rows). limit: Max number of rows to return; clamped to [1, 1000].

Returns: Array of rows oldest-first, each with timestamp (unix millis), datetime (ISO 8601), symbol, fundingRate (e.g. 0.0001 = 1 bp), and exchange-specific extras under info. On unsupported exchanges returns {"error": "..."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchange_idYes
symbolYes
since_msNo
limitNo
Behavior5/5

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

No annotations are provided, so the description fully bears the burden. It discloses varying funding intervals, timestamp behavior, default window, limit clamping, return format (oldest-first), and error handling on unsupported exchanges. No contradictions with annotations.

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?

The description is well-structured and front-loaded with purpose, but it is slightly verbose with extensive examples in the exchange_id parameter list. Every sentence adds value, but a bit more conciseness could improve it.

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 4 parameters, no output schema, and moderate complexity, the description is comprehensive: covers usage context, parameter details, return fields, cadence caveats, and error responses. No significant gaps remain.

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?

The input schema has 0% description coverage, but the description compensates fully: it lists specific exchange IDs, explains symbol format with settle suffix examples, describes `since_ms` as optional unix-millis lower bound with default behavior, and notes `limit` clamping to [1,1000] with default 100.

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?

The description clearly states it retrieves historical funding-rate time-series for a perpetual contract on one exchange. It distinguishes itself from siblings `get_funding_rate` (single snapshot) and `compare_funding_rates` (cross-exchange current rate), providing specific verb and resource.

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?

The description explicitly specifies when to use (trend analysis, spotting cycles, quant signal) and when not (use `get_funding_rate` for single snapshot, use `compare_funding_rates` for cross-exchange current rate). It also warns about varying funding intervals by venue, offering clear guidance on when to avoid this tool.

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