> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> GoldRush Hyperliquid API - the complete data layer for Hyperliquid (HyperCore + HIP-3 + HyperEVM). Use this skill whenever the user is building on Hyperliquid, mentions hitting Hyperliquid /info rate limits or the 1000-subscription-per-IP cap on wss://api.hyperliquid.xyz/ws, needs a drop-in replacement for api.hyperliquid.xyz/info or /ws, wants to subscribe to l2Book (aggregated order book, wildcard coin) or the GoldRush-native l4Book (order-level diff stream with user/oid/cloid/tif), wants HIP-3 market data, needs real-time wallet streaming for HyperCore, needs pre-decoded liquidations or vault events, or wants Hyperliquid data in their warehouse. The Info API and WebSocket API at hypercore.goldrushdata.com are byte-for-byte wire-compatible with the public Hyperliquid endpoints and have no rate limits or per-IP subscription caps. For non-Hyperliquid blockchain data, use goldrush-foundational-api instead. For other real-time chain streams, use goldrush-streaming-api. For warehouse delivery on any chain, use goldrush-pipeline-api.

# SKILL

# GoldRush Hyperliquid API

The complete data layer for Hyperliquid. One API key unlocks:

* **Info API** - drop-in replacement for `POST api.hyperliquid.xyz/info` at `hypercore.goldrushdata.com/info`. No rate limits. Same request body, same response shape.
* **WebSocket API** - drop-in replacement for `wss://api.hyperliquid.xyz/ws` at `wss://hypercore.goldrushdata.com/ws?key=<KEY>`. No 1000-subscription-per-IP cap. `l2Book` (wildcard `coin`) and the GoldRush-native `l4Book` order-level diff stream.
* **Streaming API** - `walletTxs` for the wallet firehose, `ohlcvCandlesForPair`/`ohlcvCandlesForToken` for HIP-3 and HIP-4 OHLCV with deployer-prefix syntax.
* **Pipeline API** - `hl_fills`, `hl_trades`, `hl_orders`, `hl_funding`, `hl_misc_events` to ClickHouse, BigQuery, Postgres, Kafka, S3.
* **Foundational API** - HyperEVM token balances, transfers, approvals, NFTs, gas.

## Drop-in Info API

```typescript theme={null}
// Before
fetch("https://api.hyperliquid.xyz/info", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ type: "clearinghouseState", user: "0x...", dex: "" }),
});

// After - same body, no rate limits
fetch("https://hypercore.goldrushdata.com/info", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ type: "clearinghouseState", user: "0x...", dex: "" }),
});
```

That's it. Existing SDKs (`nomeida/hyperliquid` for JS, `hyperliquid-python-sdk` for Python) work after a `baseUrl` override.

## Available Info API types (today)

| Type                          | Use                                                                                             |
| ----------------------------- | ----------------------------------------------------------------------------------------------- |
| `metaAndAssetCtxs`            | Perp universe + per-asset live mark price, funding, OI, day volume                              |
| `spotMetaAndAssetCtxs`        | Spot universe + per-pair live mark price, mid, day volume                                       |
| `outcomeMeta`                 | Active HIP-4 outcome universe with outcome IDs, descriptions, and Yes/No side specs             |
| `clearinghouseState`          | Per-user perp account: positions, margin, account value                                         |
| `spotClearinghouseState`      | Per-user spot balances                                                                          |
| `frontendOpenOrders`          | Per-user open orders with TP/SL trigger metadata                                                |
| `subAccounts`                 | Sub-accounts owned by a master, each with inlined perp and spot state                           |
| `userFills`                   | Most recent fills for a user                                                                    |
| `userFillsByTime`             | Fills bounded by a time window                                                                  |
| `userTwapSliceFills`          | Most recent TWAP slice fills tagged with the parent `twapId`                                    |
| `userFunding`                 | Funding payment history with rate, applied size, USDC delta                                     |
| `userNonFundingLedgerUpdates` | Ledger events except funding - deposits, withdrawals, transfers, vault flows, liquidations      |
| `userVaultEquities`           | Per-vault locked equity with unlock timestamps                                                  |
| `delegatorSummary`            | Current delegated, undelegated, and pending-withdrawal HYPE totals                              |
| `delegatorHistory`            | Delegate, undelegate, deposit, and withdrawal staking events                                    |
| `delegatorRewards`            | Accrued staking rewards (delegation and validator commission)                                   |
| `batchClearinghouseState`     | Perp account state for 1-50 wallets in one request. **GoldRush-native**, no upstream equivalent |
| `batchSpotClearinghouseState` | Spot balances for 1-50 wallets in one request. **GoldRush-native**, no upstream equivalent      |

Any other `type` value returns `{"error":"unsupported_type","type":"<the type you sent>"}`. Type expansion is on the roadmap.

## Available WebSocket subscriptions (today)

| Channel  | Use                                                                                                                                                                                                                                 |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `l2Book` | Aggregated `{px, sz, n}` order book per tick. `coin` is **optional** - omit to stream every asset on one subscription. Drop-in for `wss://api.hyperliquid.xyz/ws` `l2Book`, no per-IP cap.                                          |
| `l4Book` | Order-level snapshot of every resting order plus per-block diffs (`order_statuses` + `book_diffs`). Exposes `user`, `oid`, `cloid`, `tif`, `triggerCondition`. `coin` is **required**. **GoldRush-native**, no upstream equivalent. |

## When to use which surface

| Need                                                                          | Use                                                                                        |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| Account state, market snapshot, open orders                                   | Info API (`POST /info`)                                                                    |
| Live order book - aggregated price levels, wildcard across all assets         | WebSocket API `l2Book` on `wss://hypercore.goldrushdata.com/ws`                            |
| Live order book - per-order detail, queue position, per-user flow attribution | WebSocket API `l4Book` (snapshot + per-block diffs, **GoldRush-native**)                   |
| Real-time wallet activity (1 → 10,000 wallets)                                | Streaming API `walletTxs`                                                                  |
| HIP-3 and HIP-4 OHLCV candles                                                 | Streaming API `ohlcvCandlesForPair` with `xyz:GOLD-USDC` syntax                            |
| Pre-decoded liquidations and vault events                                     | Streaming API `walletTxs` → `HypercoreFillTransaction.liquidation`, `HypercoreLedgerEvent` |
| Land Hyperliquid data in your warehouse                                       | Pipeline API HyperCore normalizer                                                          |
| HyperEVM (chain `999`) token balances/transfers/NFTs                          | Foundational API on `hyperevm-mainnet`                                                     |

## Critical rules

1. **Info API endpoint URL** - `https://hypercore.goldrushdata.com/info` (note: `hypercore`, not `hyperliquid`).
2. **Info API auth header** - `Authorization: Bearer <GOLDRUSH_API_KEY>`. Same key as Foundational/Streaming/Pipeline.
3. **WebSocket API endpoint URL** - `wss://hypercore.goldrushdata.com/ws?key=<GOLDRUSH_API_KEY>`. Auth is a `?key=` query parameter at connect time; **no `Authorization` header is sent**. Same key as the Info API.
4. **Wire-compat with Hyperliquid** - Info API request body and WebSocket subscription payloads are byte-for-byte identical to the public Hyperliquid endpoints for implemented types/channels.
5. **`l4Book` is GoldRush-only** - it does not exist on `wss://api.hyperliquid.xyz/ws`. `coin` is required; `l2Book`'s `coin` is optional (wildcard streams every asset).
6. **HIP-3 and HIP-4 syntax** - `<deployer>:<symbol>-<quote>` for OHLCV pairs (e.g. `xyz:GOLD-USDC`); plain symbol for OHLCV tokens.
7. **Streaming chain enum** - `HYPERCORE_MAINNET` (SCREAMING\_SNAKE\_CASE), not `hypercore-mainnet`.
8. **Historical depth** - HyperCore data starts at block 676,607,001 (2025-07-27T01:49:59Z); HyperEVM goes back to genesis.
9. **No rate limits** on the Info API, WebSocket API, or Streaming API for HyperCore. No 1000-subscription-per-IP cap on the WebSocket API.

## Reference Files

| File                                            | When to read                                                                                                                                           |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [overview.md](references/overview.md)           | Need full product overview, infrastructure details, or what's available across all surfaces                                                            |
| [info-api.md](references/info-api.md)           | Building against the `POST /info` endpoint - migration, SDK overrides, per-endpoint reference                                                          |
| [websocket-api.md](references/websocket-api.md) | Building against `wss://hypercore.goldrushdata.com/ws` - `l2Book` aggregated snapshots, `l4Book` order-level diffs, per-endpoint reference and recipes |
| [streaming.md](references/streaming.md)         | Building real-time features over the GraphQL Streaming API - wallet firehose, HIP-3 and HIP-4 OHLCV, liquidations and vault events                     |
| [roadmap.md](references/roadmap.md)             | What's shipping next - type expansion, time-travel, cross-venue, signed responses                                                                      |
