# Hyperliquid — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-all-perp-markets \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-all-spot-markets \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-leaderboard \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-order-book \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-top-traders \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/get-trader-open-positions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/hyperliquid/identify-delta-neutral-traders \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"window":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.