get_funding_rate_history
Retrieve historical funding rate data for Binance perpetual contracts. Specify the symbol and optional limit to access funding rate records for informed trading strategies.
Instructions
Get funding rate history.
Args: symbol: Perpetual contract symbol. limit: Number of records to return (default 100).
Returns: Funding rate data list.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| symbol | Yes |
Implementation Reference
- binance.py:205-222 (handler)The handler function for the 'get_funding_rate_history' tool. It is decorated with @mcp.tool(), which handles registration in FastMCP. Fetches the funding rate history from the Binance futures API using requests.@mcp.tool() def get_funding_rate_history(symbol: str, limit: int = 100) -> Any: """ Get funding rate history. Args: symbol: Perpetual contract symbol. limit: Number of records to return (default 100). Returns: Funding rate data list. """ url = "https://fapi.binance.com/fapi/v1/fundingRate" params = {"symbol": symbol, "limit": limit} response = requests.get(url, params=params) if response.status_code == 200: return response.json() return {"error": response.text}
- binance.py:205-205 (registration)The @mcp.tool() decorator registers the get_funding_rate_history function as an MCP tool.@mcp.tool()