> ## 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.

# Info API Migration Guide

> Move from the public Hyperliquid /info API to GoldRush by changing one URL and one header. Step-by-step examples in cURL, JavaScript, and Python.

Moving from the public Hyperliquid `/info` API to GoldRush is two changes:

1. **URL** - replace `api.hyperliquid.xyz/info` with `hypercore.goldrushdata.com/info`.
2. **Header** - add `Authorization: Bearer <GOLDRUSH_API_KEY>`.

That's it. The request body and response shape are byte-for-byte identical.

## Side-by-side

### cURL

<CodeGroup>
  ```bash Public Hyperliquid theme={null}
  curl -X POST https://api.hyperliquid.xyz/info \
    -H "Content-Type: application/json" \
    -d '{
      "type": "clearinghouseState",
      "user": "0xecb63caa47c7c4e77f60f1ce858cf28dc2b82b00",
      "dex": ""
    }'
  ```

  ```bash GoldRush theme={null}
  curl -X POST https://hypercore.goldrushdata.com/info \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "clearinghouseState",
      "user": "0xecb63caa47c7c4e77f60f1ce858cf28dc2b82b00",
      "dex": ""
    }'
  ```
</CodeGroup>

### JavaScript / TypeScript

<CodeGroup>
  ```typescript Public Hyperliquid theme={null}
  const response = await fetch("https://api.hyperliquid.xyz/info", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      type: "metaAndAssetCtxs",
      dex: "",
    }),
  });

  const data = await response.json();
  ```

  ```typescript GoldRush theme={null}
  const response = await fetch("https://hypercore.goldrushdata.com/info", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      type: "metaAndAssetCtxs",
      dex: "",
    }),
  });

  const data = await response.json();
  ```
</CodeGroup>

### Python

<CodeGroup>
  ```python Public Hyperliquid theme={null}
  import requests

  response = requests.post(
      "https://api.hyperliquid.xyz/info",
      json={
          "type": "spotClearinghouseState",
          "user": "0xecb63caa47c7c4e77f60f1ce858cf28dc2b82b00",
          "dex": "",
      },
  )

  print(response.json())
  ```

  ```python GoldRush theme={null}
  import os
  import requests

  response = requests.post(
      "https://hypercore.goldrushdata.com/info",
      headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
      json={
          "type": "spotClearinghouseState",
          "user": "0xecb63caa47c7c4e77f60f1ce858cf28dc2b82b00",
          "dex": "",
      },
  )

  print(response.json())
  ```
</CodeGroup>

## Behavioral notes

Things to be aware of when you cut over.

### Response is byte-equal, modulo live drift

For implemented types, the response body matches Hyperliquid byte-for-byte - same keys, same nesting, same value types. Numeric fields update independently on each side, so a market-price field will diverge by tens of milliseconds, but the schema is identical.

### Unsupported types return a JSON error

Types that GoldRush doesn't natively serve return `{"error":"unsupported_type","type":"<the type you sent>"}` with HTTP 400. They are not forwarded to upstream Hyperliquid. See the [Info API overview](/goldrush-hyperliquid/info-api/overview) for the current list of supported types.

### Auth errors return JSON

A missing or invalid key returns `401` with body `{"error":"unauthorized"}`. Public Hyperliquid has no auth and never returns 401.

### Existing SDKs work after a `baseUrl` override

The two most-used SDKs work unchanged:

* `nomeida/hyperliquid` (JavaScript)
* `hyperliquid-dex/hyperliquid-python-sdk` (Python)

See [SDK compatibility](/goldrush-hyperliquid/info-api/sdk-compatibility) for the override snippets.

## Authentication

The Info API uses your standard GoldRush API key. The same key works against the [Foundational API](/goldrush-foundational-api/authentication), the [Streaming API](/goldrush-streaming-api/authentication), and the [Pipeline API](/goldrush-pipeline-api/authentication). If you don't have one yet, [sign up here](https://goldrush.dev/platform/auth/register/).

Never hardcode keys in source. Use environment variables or a secrets manager.

## What you gain

* **No rate limits.** No 1200 weight/min cap, no per-address throttling, no IP buckets.
* **Faster reads.** Sub-150 ms p50 target for warm responses; orderbook reads driven from a live WebSocket-fed cache.
* **More types.** Batched user state, builder-attribution data, liquidation feed, and composites.
* **HIP-3 and HIP-4 first-class.** Deployer-prefix syntax (`xyz:GOLD-USDC`) is supported across `meta` and `metaAndAssetCtxs` when a `dex` is provided.
* **One key for everything Hyperliquid.** The same API key unlocks Streaming, Pipeline, and HyperEVM via the Foundational API.
