# x402stock Perpetuals Funding Rate History

> x402stock Perpetuals Funding Rate History is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns historical funding rates and premiums for a crypto perpetual contract (e.g. BTC, ETH) on Hyperliquid over a specified time window

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/perps/funding/%7Bcoin%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-perpetuals-funding-rate-history-f27c5a2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gBpGEo27titkDY1D6ZoGs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402stock-perpetuals-funding-rate-history-f27c5a2a
```

Example prompt: Pull the last 72 hours of BTC perpetual funding rate history from x402stock — I want to see the hourly funding rate, APR, and premium for each data point.

## When to prefer this

Use this endpoint when you need on-chain perpetual futures funding rate history for a specific cryptocurrency, particularly from Hyperliquid. Ideal for DeFi traders, quant analysts, or agents that need to assess carry trade opportunities, monitor funding regime changes, or backtest funding-rate strategies — without needing API keys, just pay $0.01 USDC per call via x402 on Base.

## Known failure modes

- Missing required 'hours' query parameter returns a validation error
- Invalid or unsupported coin symbol returns empty or error response
- Hours value exceeding 720 (max) returns a validation/range error
- Payment not provided or insufficient USDC causes 402 Payment Required response
- Start/end timestamps that produce zero matching records return count=0 with empty history array

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

Returns a JSON object with the coin symbol, venue (e.g. Hyperliquid), as_of timestamp, count of records, and a history array where each entry contains: time (ISO timestamp), funding_rate_hourly (fractional rate), funding_apr_percent (annualized rate), and premium (basis). Covers up to 720 hours of history.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "hours"
     ],
     "properties": {
      "end": {
       "type": "integer",
       "maximum": 9007199254740991,
       "exclusiveMinimum": 0
      },
      "hours": {
       "type": "integer",
       "default": 24,
       "maximum": 720,
       "exclusiveMinimum": 0
      },
      "start": {
       "type": "integer",
       "maximum": 9007199254740991,
       "exclusiveMinimum": 0
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "source",
      "as_of",
      "venue",
      "coin",
      "count",
      "history"
     ],
     "properties": {
      "coin": {
       "type": "string"
      },
      "as_of": {
       "type": "string"
      },
      "count": {
       "type": "number"
      },
      "venue": {
       "type": "string"
      },
      "source": {
       "type": "string",
       "const": "x402stock"
      },
      "history": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "time",
         "funding_rate_hourly",
         "funding_apr_percent",
         "premium"
        ],
        "properties": {
         "time": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "premium": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "funding_apr_percent": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "funding_rate_hourly": {
         
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "coin": "BTC",
  "as_of": "2026-06-04T00:00:00.000Z",
  "count": 1,
  "venue": "hyperliquid",
  "source": "x402stock",
  "history": [
   {
    "time": "2026-06-03T00:00:00.000Z",
    "premium": -0.0003727867,
    "funding_apr_percent": 10.95,
    "funding_rate_hourly": 0.0000125
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-perpetuals-funding-rate-history-f27c5a2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
