# Hyperliquid — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access real-time leaderboard rankings, market data for perpetual and spot markets, order books, and detailed trader analytics on the Hyperliquid decentralized exchange. Monitor top traders' open positions and identify delta-neutral trading strategies.

**Category:** Web3 & Onchain | **Website:** [app.hyperliquid.xyz/](https://app.hyperliquid.xyz/) | **Docs:** [parse.bot/marketplace/0ef2734c-0eaf-458f-bb42-dc020edab1a0/app-hyperliquid-xyz-api](https://parse.bot/marketplace/0ef2734c-0eaf-458f-bb42-dc020edab1a0/app-hyperliquid-xyz-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_perp_markets

Retrieve all perpetual futures trading symbols listed on Hyperliquid with live market data including mark price, funding rate, open interest, and 24h notional volume. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_all_perp_markets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_all_spot_markets

Retrieve all spot trading pairs on Hyperliquid with token metadata including name, decimals, token IDs, and EVM contract addresses. Returns both the universe of trading pairs and detailed token information.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_all_spot_markets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_leaderboard

Fetch the leaderboard dataset including traders with their account values and performance across time windows (day, week, month, allTime). Returns up to ~15000 rows ranked by account value. Each row includes windowPerformances with PNL, ROI, and volume for each time window.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `min_value` | number | No | Minimum account value filter in USD. Rows with account value below this are excluded. |
| `window` | string | No | Time window filter for display context. Accepted values: allTime, 30d, 7d, 24h. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"min_value":"<number>","window":"<string>"}'
```

### get_order_book

Get live order book (bids and asks) for a specific perpetual trading symbol. Returns 20 levels of depth on each side with price, size, and number of orders at each level.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol` | string | Yes | Perpetual trading symbol (e.g. BTC, ETH, SOL, ATOM). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_order_book \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"<string>"}'
```

### get_top_traders

Retrieve the top N traders from the leaderboard sorted by PNL for a specified time window. Filters by minimum account value. Returns a flat array of trader performance records with resolved PNL, ROI, volume, and account value.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of traders to return. |
| `min_value` | number | No | Minimum account value filter in USD. |
| `window` | string | No | Time window for PNL ranking. Accepted values: allTime, 30d, 7d, 24h. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_top_traders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","min_value":"<number>","window":"<string>"}'
```

### get_trader_open_positions

Retrieve open perpetual positions and margin summary for a given wallet address on Hyperliquid. Returns account value, margin used, withdrawable balance, and individual asset positions with entry price, size, and unrealized PNL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `address` | string | Yes | Ethereum wallet address (0x-prefixed, 42 characters). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/get_trader_open_positions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address":"<string>"}'
```

### identify_delta_neutral_traders

Analyze top 3 traders by volume to identify delta-neutral strategies (offsetting spot and perp positions in the same asset). Returns traders with overlapping positions having hedge ratio greater than 20%. May return an empty array if no delta-neutral positions are found among top traders at the time of query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `window` | string | No | Time window for ranking traders by volume. Accepted values: allTime, 30d, 7d, 24h. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-app-hyperliquid-xyz-api-0ef2734c/identify_delta_neutral_traders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"window":"<string>"}'
```
