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

# Overview

> Introduction on Uniblock's Raw Hyperliquid Info unified request endpoint.

# Hyperliquid Info API

The Raw Hyperliquid Info endpoint forwards a native Hyperliquid [`/info`](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint) request body — selected by its `type` field — through Uniblock's unified request lifecycle and returns the upstream response verbatim. Unlike a Direct passthrough, the request flows through the unified provider waterfall, so you get automatic provider failover, billing, and observability while keeping the upstream request and response shapes unchanged.

<Info>
  Remember to create your project & get your API-KEY through our [Uniblock's
  dashboard](https://dashboard.uniblock.dev).
</Info>

## Endpoint

| Method | Path                  | Description                                                                 |
| ------ | --------------------- | --------------------------------------------------------------------------- |
| `POST` | `v1/hyperliquid/info` | Forward a native Hyperliquid `/info` request and return the upstream reply. |

## Uniblock Query Params

* `chainId`: `999` for Hyperliquid mainnet (default) or `998` for Hyperliquid testnet.
* `provider`: optionally pin a specific provider; otherwise Uniblock routes through the provider waterfall.

## How it works

Every request body must include a `type` discriminator that mirrors Hyperliquid's own `/info` contract (for example `clearinghouseState`, `l2Book`, `metaAndAssetCtxs`). The `type` selects the operation, and any operation-specific fields are forwarded verbatim. Requests without a supported `type` fail fast with a `400` at the HTTP boundary rather than reaching a provider.

### Synthetic Uniblock types

In addition to the native Hyperliquid operations, Uniblock defines a set of synthetic `type`s that are composed on Uniblock's side and dispatched through this same route:

| Type                       | Description                                                                                                                           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `portfolioState`           | Normalized Hyperliquid Portfolio State — a stable account-state view composed across perpetuals, spot balances, and user abstraction. |
| `batchClearinghouseStates` | Perpetual clearinghouse state for a list of users in a single request (one Info sub-request per user).                                |
| `batchPortfolioStates`     | Full Portfolio State for a list of users in a single request.                                                                         |

Batch types carry a `{ "type": ..., "users": string[] }` body and are limited to **50 users** per request.

## Providers

The following providers serve Raw Hyperliquid Info, in priority order:

* Alchemy
* Dwellir
* Chainstack
* GoldRush (Covalent)

Provider support is per-`type`: raw HyperCore-node passthroughs (Dwellir, Chainstack) forward every native node operation, while some aggregations are served only by specific providers. Uniblock routes each request to a provider that serves the requested `type`.

## Basic Request

Replace `API_KEY` with your actual Uniblock API key.

<CodeGroup>
  ```bash theme={null}
  curl --location \
  'https://api.uniblock.dev/uni/v1/hyperliquid/info?chainId=999' \
  --header 'x-api-key: {{ API_KEY }}' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "clearinghouseState",
    "user": "0x0000000000000000000000000000000000000000"
  }'
  ```
</CodeGroup>

## Synthetic Portfolio State

Replace `API_KEY` with your actual Uniblock API key.

<CodeGroup>
  ```bash theme={null}
  curl --location \
  'https://api.uniblock.dev/uni/v1/hyperliquid/info?chainId=999' \
  --header 'x-api-key: {{ API_KEY }}' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "portfolioState",
    "user": "0x0000000000000000000000000000000000000000"
  }'
  ```
</CodeGroup>
