# x402stock On-Chain Perpetuals Data

> x402stock On-Chain Perpetuals Data is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-08).

Returns real-time perpetuals market data for a given cryptocurrency from Hyperliquid, including funding rate, open interest, mark price, and leverage.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/perps/%7Bcoin%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-on-chain-perpetuals-data-6d8cd52f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GiaBV0yWTPImIXU3TKRb1

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-on-chain-perpetuals-data-6d8cd52f
```

Example prompt: What are the current perpetuals stats for BTC on Hyperliquid — funding rate, open interest, mark price, and max leverage?

## When to prefer this

Use this endpoint when you need real-time on-chain perpetuals data (funding rates, open interest, leverage, volumes) for a specific cryptocurrency from Hyperliquid, especially in a pay-per-call, no-account-required context using USDC micropayments via x402 on Base.

## Known failure modes

- Invalid or unsupported coin symbol returns an error or empty data
- Payment failure (insufficient USDC or x402 protocol error) blocks the request
- Network timeout if Hyperliquid data feed is temporarily unavailable
- Coin not listed on Hyperliquid returns no data

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

A JSON object containing real-time perpetuals market data for the requested coin from Hyperliquid, including mid price, mark price, oracle price, hourly funding rate, annualized funding APR, funding premium, open interest, 24h trading volume in USD and base currency, max leverage, and previous day's closing price, along with the venue, market type, and data timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "coin": "BTC",
   "premium": -0.0003457543,
   "mid_price": 63606.5,
   "mark_price": 63606,
   "max_leverage": 40,
   "oracle_price": 63629,
   "open_interest": 31304.105,
   "day_volume_usd": 6772680481.63,
   "prev_day_price": 64583,
   "day_volume_base": 106799.6,
   "funding_apr_percent": 10.95,
   "funding_rate_hourly": 0.0000125
  },
  "as_of": "2026-06-04T00:00:00.000Z",
  "venue": "hyperliquid",
  "market": "perp",
  "source": "x402stock"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-on-chain-perpetuals-data-6d8cd52f/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)
