# Hyperliquid Perpetual Funding Rate API (x402)

> Hyperliquid Perpetual Funding Rate API (x402) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-31).

Returns real-time perpetual futures funding rates, mark/oracle prices, and open interest for BTC, ETH, or SOL from Hyperliquid, paid per-call via x402 USDC micropayment.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/perp-funding?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-perpetual-funding-rate-api-x402-31d123db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5t3ETuwRcK5XcrqziqWFD

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 hyperliquid-perpetual-funding-rate-api-x402-31d123db
```

Example prompt: What's the current Hyperliquid funding rate for BTC perps — give me the hourly rate, the annualized APR, and how much open interest is out there right now?

## When to prefer this

Choose this endpoint when your agent needs real-time Hyperliquid-specific perpetual funding rates, mark/oracle price spreads, or open interest data without API key management — especially in micropayment-native (x402) agent architectures where per-call USDC billing is preferred over subscriptions. Best suited for trading agents that need funding rate signals to evaluate carry trades, position costs, or market sentiment on BTC, ETH, or SOL perps specifically on Hyperliquid.

## Known failure modes

- Payment not sent or insufficient USDC balance — 402 Payment Required returned
- Invalid or unsupported coin symbol — falls back to default (BTC) or returns error
- Hyperliquid upstream API downtime — stale or missing data
- Network timeout on the Cloudflare Worker — connection error
- Missing query param defaults to BTC silently — agent may receive wrong coin's data if param omitted

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

Returns a JSON object with mark price, oracle price, open interest (in units and USD), hourly funding rate, annualized funding APR percentage, the venue name (hyperliquid), source URLs, and an ISO 8601 timestamp of last update — keyed by coin symbol (BTC/ETH/SOL).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "coin": {
       "enum": [
        "BTC",
        "ETH",
        "SOL"
       ],
       "type": "string",
       "examples": [
        "BTC",
        "ETH",
        "SOL"
       ],
       "description": "Perp coin (default BTC)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "coins": {
   "BTC": {
    "mark_px": 80860,
    "oracle_px": 80870,
    "open_interest": 30000,
    "funding_hourly": 0.0000125,
    "funding_apr_pct": 10.95,
    "open_interest_usd": 2426000000
   }
  },
  "venue": "hyperliquid",
  "sources": [
   "https://api.hyperliquid.xyz/info"
  ],
  "updated_at": "2026-10-28T11:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-perpetual-funding-rate-api-x402-31d123db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
