# GraphAdvocate Uniswap/Hyperliquid Cross-Venue Basis Calculator

> GraphAdvocate Uniswap/Hyperliquid Cross-Venue Basis Calculator is a paid API for AI agents from graphadvocate.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Computes the spot vs perpetual basis percentage by joining Uniswap on-chain spot price (via subgraph) against Hyperliquid perp last-fill price, returning basis_pct and a directional signal.

## Facts

- Endpoint: POST https://graphadvocate.com/uniswap/basis
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/graphadvocate-uniswap-hyperliquid-cross-venue-basis-calculator-233700fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ybct2wUFUmb7pR7WDP9Gj

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 graphadvocate-uniswap-hyperliquid-cross-venue-basis-calculator-233700fd -d '<json body>'
```

Example prompt: What's the current spot vs perp basis for ETH — join the Uniswap on-chain spot price against the Hyperliquid last-fill price and tell me if longs are crowded or if the perp is at a discount.

## When to prefer this

Choose this endpoint when you need a cross-venue basis signal that requires joining two structurally different data sources: Uniswap on-chain liquidity (via The Graph subgraph) and Hyperliquid perpetual last-fill prices. It is the only endpoint that returns a normalized basis_pct and a directional crowding signal (perp_premium / perp_discount / aligned) in a single call. Prefer this over single-venue endpoints when you need to detect funding pressure, perp crowding, or basis arbitrage opportunities between DeFi spot and centralized-style perp markets.

## Known failure modes

- Coin not found on Uniswap subgraph — no liquidity pool or subgraph data unavailable
- Coin not listed on Hyperliquid perps — returns error or null perp price
- Chain parameter unsupported or subgraph endpoint unresponsive
- Stale last-fill price if Hyperliquid market is illiquid — basis_pct may be misleading
- Payment of $0.05 USDC not processed — request rejected with payment required error

## How this service works

Cross-venue SPOT vs PERP basis. POST {coin, chain?}. Joins Uniswap spot (on-chain, from the subgraph) against the Hyperliquid perp last-fill price and returns basis_pct + a signal (perp_premium / perp_discount / aligned). A JOIN a single-venue passthrough structurally cannot return. Positive basis means longs are crowded and typically paying funding.

## Output

Returns basis_pct (a percentage showing how far the Hyperliquid perp price deviates from the Uniswap on-chain spot price) and a signal enum: 'perp_premium' (perp above spot, longs likely crowded and paying funding), 'perp_discount' (perp below spot), or 'aligned' (prices in sync). Also includes the raw spot and perp prices used in the calculation.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "coin": "BTC",
  "perp": {
   "venue": "hyperliquid",
   "price_usd": 64826
  },
  "spot": {
   "venue": "uniswap-v3",
   "price_usd": 64588.86
  },
  "signal": "perp_premium",
  "basis_pct": 0.3672
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/graphadvocate-uniswap-hyperliquid-cross-venue-basis-calculator-233700fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from graphadvocate.com](https://www.zero.xyz/host/graphadvocate.com/llms.txt)
