# Hyperliquid Perpetuals Snapshot (x402)

> Hyperliquid Perpetuals Snapshot (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 a real-time perpetuals market snapshot for BTC, ETH, or SOL from Hyperliquid, including mark price, oracle price, open interest, hourly funding rate, and annualized funding APR.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/v1/perpetuals/snapshot?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-perpetuals-snapshot-x402-76aa6e9f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap___pW9m8cWWwxe_PcUhijI

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-perpetuals-snapshot-x402-76aa6e9f
```

Example prompt: What are the current mark price, oracle price, open interest, and funding rate for BTC perpetuals on Hyperliquid right now?

## When to prefer this

Choose this endpoint when you need real-time Hyperliquid perpetuals data (funding rates, open interest, mark/oracle prices) for BTC, ETH, or SOL without setting up API keys — especially suited for autonomous AI trading agents that can pay $0.005 USDC per call via the x402 micropayment protocol on Base. Prefer this over direct Hyperliquid API calls when operating in an agent environment with built-in x402 payment capability and no credential management.

## Known failure modes

- Invalid coin symbol returns an error (only BTC, ETH, SOL accepted)
- Payment failure via x402 if USDC balance on Base is insufficient
- Hyperliquid upstream API downtime causes stale or missing data
- Network timeout on the Workers edge if Hyperliquid source is slow
- Missing coin query param defaults to BTC (not an error, but may surprise callers expecting a different coin)

## 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

A JSON object containing the perpetuals snapshot for the requested coin, including mark_px (mark price), oracle_px (oracle price), open_interest (in coin units), open_interest_usd, funding_hourly (hourly funding rate), funding_apr_pct (annualized funding rate as a percentage), the venue name ('hyperliquid'), source URLs, and an updated_at timestamp.

## 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-perpetuals-snapshot-x402-76aa6e9f/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)
