# Hyperliquid Long/Short Ratio History

> Hyperliquid Long/Short Ratio History is a paid API for AI agents from hyperliquid-data.v1337.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns historical long/short ratio data for Hyperliquid perpetuals trading, showing how the balance between long and short positions has shifted over time

## Facts

- Endpoint: POST https://hyperliquid-data.v1337.org/services/hyperliquid-data/v1/live/long-short/history
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-long-short-ratio-history-dcef662f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MMgTSzqKGNTNFkLA78Ymc

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-long-short-ratio-history-dcef662f -d '<json body>'
```

Example prompt: Pull the long/short ratio history for BTC perps on Hyperliquid over the past 7 days so I can see how trader positioning has shifted.

## When to prefer this

Use this endpoint when you need historical long/short ratio data specifically from the Hyperliquid DEX, computed from first-party on-chain node fills data rather than third-party aggregators. Ideal for analyzing trader sentiment trends, backtesting positioning strategies, or building dashboards that reflect actual Hyperliquid perpetuals market structure over time.

## Known failure modes

- HTTP 402 with x402 payment required if free quota is exhausted — must pay 0.001 USDC per call
- Invalid or missing body parameters return a 400-level error
- Unknown asset or market symbol returns empty or error response
- Requesting a time range beyond available historical data may return partial or empty results
- Network timeouts if the upstream Hyperliquid node is temporarily unavailable

## How this service works

Operator-neutral Hyperliquid trading intelligence — perp fills, position lifecycles, all-wallet leaderboards, trader cohorts, liquidation risk and prediction markets. Every endpoint is FIRST-PARTY: computed from our own node_fills ledger and the Hyperliquid public info API (no third-party data source). Free quota, then HTTP 402 (x402: pay-per-call in USDC, no account, no key).

## Output

Returns time-series data showing the historical long/short ratio for a given Hyperliquid perpetuals market, including timestamps, percentage of longs vs shorts, and position counts — computed from first-party node fills ledger data.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "description": "Operator-defined JSON payload. Probe the upstream or consult the operator's /openapi.json for the concrete shape.",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-long-short-ratio-history-dcef662f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hyperliquid-data.v1337.org](https://www.zero.xyz/host/hyperliquid-data.v1337.org/llms.txt)
