# Perp-vs-Spot Basis Calculator (Hyperliquid)

> Perp-vs-Spot Basis Calculator (Hyperliquid) is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-16).

Returns the perpetual-vs-spot basis for a given coin, including mark price, spot oracle price, basis percentage, annualized carry, and a contango/backwardation signal for basis-trade analysis.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/perps/basis
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perp-vs-spot-basis-calculator-hyperliquid-d67a3fed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sQYiIrmkYAUDs7eLqoW9b

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 perp-vs-spot-basis-calculator-hyperliquid-d67a3fed -d '<json body>'
```

Example prompt: What's the current basis between ETH perps and spot on Hyperliquid — is it in contango or backwardation, and what's the annualized carry for a cash-and-carry trade?

## When to prefer this

Use this endpoint when you need to evaluate the basis between a perpetual futures contract and its underlying spot price for a specific coin on Hyperliquid, especially to identify cash-and-carry trade opportunities, measure contango/backwardation, or quantify annualized carry. Prefer this over generic funding rate endpoints when the key question is spot-vs-perp price divergence rather than just the funding rate.

## Known failure modes

- Unknown or unsupported coin symbol returns an error
- Hyperliquid market data unavailable causes a fetch failure
- Missing 'coin' field in request body returns a validation error
- Market not listed on Hyperliquid returns empty or null data

## How this service works

Perp-vs-spot basis for a coin: mark price vs spot oracle, basis %, annualized carry, and contango/backwardation signal. Send { coin }. Basis-trade and cash-and-carry signal.

## Output

Returns the mark price of the perpetual, the spot oracle price, the raw basis (mark minus spot), basis as a percentage, annualized carry rate, and a contango or backwardation signal — giving everything needed to evaluate a cash-and-carry or basis-arbitrage trade.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "coin"
 ],
 "properties": {
  "coin": {
   "type": "string",
   "description": "Perp symbol, e.g. ETH"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perp-vs-spot-basis-calculator-hyperliquid-d67a3fed/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
