# x402stock On-Chain Perps Orderbook

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

Returns the live bid/ask orderbook for a crypto perpetuals contract (e.g. BTC) from Hyperliquid via x402 pay-per-call

## Facts

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

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-perps-orderbook-a6258742
```

Example prompt: What does the current BTC perps orderbook look like on Hyperliquid — show me the top bids and asks with sizes and prices?

## When to prefer this

Use this endpoint when you need live on-chain perpetual futures orderbook depth for a specific crypto asset (e.g. BTC, ETH) from Hyperliquid, without needing an API key or account — paying only $0.01 USDC per call. Prefer this over centralized exchange orderbook APIs when DeFi/on-chain data is specifically required.

## Known failure modes

- Unsupported coin symbol returns an error or empty orderbook
- Hyperliquid venue outage may cause stale or missing data
- Malformed coin parameter in URL path returns 4xx error
- Network latency may cause slight staleness in the as_of timestamp

## 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 arrays of bid and ask entries (each with size, price, and order count), the coin symbol, a timestamp (as_of), and the venue (Hyperliquid). Costs $0.01 USDC per call via x402 on Base, no API key required.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asks": [
   {
    "size": 5.04588,
    "price": 63591,
    "orders": 12
   }
  ],
  "bids": [
   {
    "size": 4.1275,
    "price": 63590,
    "orders": 10
   }
  ],
  "coin": "BTC",
  "as_of": "2026-06-04T00:00:00.000Z",
  "venue": "hyperliquid",
  "source": "x402stock"
 }
}
```

## More

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