Skip to main content
Glama

Funding history (paid, x402) — $0.003

get_funding_history
Read-onlyIdempotent

Use when backtesting or analyzing historical crypto funding rates for one perp (up to 90 days). Historical funding rates for one Hyperliquid perp ($0.003/call, USDC on Base via x402): hourly settlements (rate hourly/8h/annualized, premium) plus mean/min/max APR, positive/negative hours and cumulative rate. hours=1-720 (default 168) or from/to; interval=4h/8h/1d buckets allow up to 2160 hours (90 days). HIP-3 supported. History back to listing (BTC since 2023-05-12). Errors: no charge. Example: GET https://cryptofeed402.site/funding/history/BTC?hours=168

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hours": 168,
      "symbol": "BTC",
      "interval": "1h"
    },
    "name": "get_funding_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd, YYYY-MM-DD (inclusive) or ISO 8601 UTC; default now
fromNoStart, YYYY-MM-DD or ISO 8601 UTC
hoursNoLast N hours (default 168; max 720 for interval=1h). Do not combine with from/to.
symbolYesHyperliquid perp ticker, e.g. BTC, ETH, kPEPE; HIP-3 builder-dex perps as dex:TICKER, e.g. xyz:TSLA
intervalNo1h = raw hourly settlements (default, max 720 hours); 4h/8h/1d = UTC buckets (max 2160 hours = 90 days)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "accepts": {
      +          "items": {
      +            "properties": {
      +              "amount": {
      +                "description": "USDC atomic units (6 decimals)",
      +                "type": "string"
      +              },
      +              "asset": {
      +                "type": "string"
      +              },
      +              "extra": {
      +                "type": "object"
      +              },
      +              "maxTimeoutSeconds": {
      +                "type": "number"
      +              },
      +              "network": {
      +                "const": "eip155:8453",
      +                "type": "string"
      +              },
      +              "payTo": {
      +                "type": "string"
      +              },
      +              "scheme": {
      +                "const": "exact",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "scheme",
      +              "network",
      +              "amount",
      +              "asset",
      +              "payTo"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "properties": {
      +            "description": {
      +              "type": "string"
      +            },
      +            "mimeType": {
      +              "type": "string"
      +            },
      +            "url": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ],
      +      "title": "x402 PaymentRequired (what this MCP tool returns, isError=true)",
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "as_of": {
      +          "description": "ISO-8601 UTC",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "count": {
      +          "description": "Number of points",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "coverage": {
      +          "description": "{expected_hours_approx, returned, max_hours_per_call, history_available}",
      +          "properties": {
      +            "expected_hours_approx": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "history_available": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "max_hours_per_call": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "returned": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "disclaimer": {
      +          "description": "Not financial advice notice",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "generated_at": {
      +          "description": "Response time",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "interval_hours": {
      +          "description": "Bucket size in hours",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "latest_funding_time": {
      +          "description": "Latest settlement time",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "points": {
      +          "description": "[{time, rate_hourly, rate_8h, annualized_pct, premium}]",
      +          "items": {
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "provenance": {
      +          "description": "Optional provenance on paid 200s",
      +          "properties": {
      +            "data_sha256": {
      +              "type": "string"
      +            },
      +            "fetched_at": {
      +              "type": "string"
      +            },
      +            "max_age_s": {
      +              "type": "number"
      +            },
      +            "source": {
      +              "type": "string"
      +            },
      +            "sources": {
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "sign_convention": {
      +          "description": "Positive = longs pay shorts",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "stats": {
      +          "description": "{mean_rate_hourly, mean_annualized_pct, min_annualized_pct, max_annualized_pct, positive_hours, negative_hours, cumulative_rate, last_24h_mean_annualized_pct}",
      +          "properties": {
      +            "cumulative_rate": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "last_24h_mean_annualized_pct": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "max_annualized_pct": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "mean_annualized_pct": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "mean_rate_hourly": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "min_annualized_pct": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "negative_hours": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "positive_hours": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "symbol": {
      +          "description": "Ticker",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "venue": {
      +          "description": "hyperliquid",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "window": {
      +          "description": "{from, to, hours, mode}",
      +          "properties": {
      +            "from": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "hours": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "mode": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "to": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "as_of",
      +        "count",
      +        "coverage",
      +        "disclaimer",
      +        "generated_at",
      +        "interval_hours",
      +        "latest_funding_time",
      +        "points",
      +        "sign_convention",
      +        "stats",
      +        "symbol",
      +        "venue",
      +        "window"
      +      ],
      +      "title": "Paid HTTP 200 body of GET /funding/history/{symbol}",
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "hours": 168,
      +    "interval": "1h",
      +    "symbol": "BTC"
      +  }
      +]
    • addedInput schema / properties / hours / examples
      Added value: +[
      +  168
      +]
    • addedInput schema / properties / interval / examples
      Added value: +[
      +  "1h"
      +]
    • addedInput schema / properties / symbol / examples
      Added value: +[
      +  "BTC"
      +]
  3. Changed5 schema fields changed
    • changedInput schema / properties / hours / description
      Previous value: -"Last N hours (default 168). Do not combine with from/to."New value: +"Last N hours (default 168; max 720 for interval=1h). Do not combine with from/to."
    • changedInput schema / properties / hours / maximum
      Previous value: -720New value: +2160
    • addedInput schema / properties / interval
      Added value: +{
      +  "description": "1h = raw hourly settlements (default, max 720 hours); 4h/8h/1d = UTC buckets (max 2160 hours = 90 days)",
      +  "enum": [
      +    "1h",
      +    "4h",
      +    "8h",
      +    "1d"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / symbol / description
      Previous value: -"Hyperliquid perp ticker, e.g. BTC"New value: +"Hyperliquid perp ticker, e.g. BTC, ETH, kPEPE; HIP-3 builder-dex perps as dex:TICKER, e.g. xyz:TSLA"
    • changedInput schema / properties / symbol / pattern
      Previous value: -"^[A-Za-z0-9]{1,20}$"New value: +"^(?:[A-Za-z]{1,10}:)?[A-Za-z0-9]{1,20}$"
  4. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses pricing ($0.003/call, USDC on Base via x402), the no-charge-on-error policy, data granularity (hourly settlements, premium, APR aggregates), history depth back to listing, and HIP-3 support. These are exactly the operational facts annotations cannot carry.

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?

Front-loaded with the use case, then pricing/coverage/limits, ending with an example request. It is dense and parenthetical-heavy, but nearly every clause carries actionable information; a small amount of the parameter restatement could be trimmed.

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?

With an output schema present, return-value explanation is optional, and annotations cover the safety profile. The description adds the remaining unknowns an agent needs: cost, billing network, error charging behavior, lookback limits and earliest available data.

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?

Schema description coverage is 100%, so the schema already documents symbol, hours, interval, from and to with the same limits. The description mostly restates those constraints (hours 1-720 default 168, 4h/8h/1d buckets to 2160 hours) rather than adding new semantics, so the baseline of 3 applies.

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?

States a specific verb and resource ('Historical funding rates for one Hyperliquid perp') plus a hard scope limit (up to 90 days), which distinguishes it from multi-perp siblings like get_extreme_funding or get_funding_history_panel. An agent can tell what this returns without opening the schema.

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

Usage Guidelines4/5

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

'Use when backtesting or analyzing historical crypto funding rates for one perp' gives a clear triggering context, and the one-perp framing implicitly excludes cross-sectional siblings. It stops short of naming an explicit alternative or stating when-not to use it, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources