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

# Hyperliquid tooling

> Set up the Hyperliquid Python SDK, configure API credentials, and connect your development environment to Hyperliquid through Chainstack RPC nodes.

Get started with a [reliable Hyperliquid RPC endpoint](https://chainstack.com/build-better-with-hyperliquid/) to use the tools below.

## Python SDK

Build Hyperliquid trading applications with the official Python SDK. The [Hyperliquid Python SDK](https://github.com/hyperliquid-dex/hyperliquid-python-sdk) provides comprehensive access to trading functionality, market data, and account management.

Install the SDK:

```bash theme={"system"}
pip install hyperliquid-python-sdk
```

Use the SDK to interact with your Chainstack Hyperliquid node:

```python Python theme={"system"}
from hyperliquid.info import Info
from hyperliquid.utils import constants

# Use your Chainstack endpoint
info = Info("YOUR_CHAINSTACK_ENDPOINT", skip_ws=True)
user_state = info.user_state("0xcd5051944f780a621ee62e39e493c489668acf4d")
print(user_state)
```

## TypeScript SDK

For TypeScript/JavaScript developers, the community-maintained [@nktkas/hyperliquid](https://github.com/nktkas/hyperliquid) SDK provides comprehensive API coverage with full type safety.

Install the SDK:

```bash theme={"system"}
npm install @nktkas/hyperliquid
```

Use the SDK:

```typescript TypeScript theme={"system"}
import { InfoClient, ExchangeClient, HttpTransport } from "@nktkas/hyperliquid";
import { privateKeyToAccount } from "viem/accounts";

// Query market data (no authentication required)
const info = new InfoClient({ transport: new HttpTransport() });
const meta = await info.meta();
console.log(meta);

// Trading operations (requires authentication)
const wallet = privateKeyToAccount("0x..."); // viem or ethers account
const exchange = new ExchangeClient({
  transport: new HttpTransport(),
  wallet
});

const result = await exchange.order({
  orders: [{
    a: 0,  // Asset index (0 = BTC)
    b: true,  // is_buy
    p: "50000",  // price
    s: "0.001",  // size
    r: false,  // reduce_only
    t: { limit: { tif: "Gtc" } }
  }],
  grouping: "na"
});
```

The SDK also supports viem and ethers wallet integrations. See the [debugging signature errors guide](https://docs.chainstack.com/docs/hyperliquid-debugging-signature-errors.md) for advanced integration patterns.

## Rust SDK

For Rust developers, use the [Hyperliquid Rust SDK](https://github.com/hyperliquid-dex/hyperliquid-rust-sdk) to build high-performance trading applications.

Install the SDK:

```bash theme={"system"}
cargo add hyperliquid_rust_sdk
```

## REST API

Interact with the Hyperliquid DEX through your Hyperliquid node using the REST API. See the complete [Hyperliquid API reference](https://docs.chainstack.com/reference/hyperliquid-getting-started.md) for all available endpoints.

Use your Chainstack Hyperliquid REST endpoint to access market data and execute trades through HTTP requests.

## JSON-RPC API

Interact with the HyperEVM of Hyperliquid through your Hyperliquid node using the JSON-RPC API. See the complete [Hyperliquid API reference](https://docs.chainstack.com/reference/hyperliquid-getting-started.md) for all available endpoints.

Use your Chainstack Hyperliquid JSON-RPC endpoint to retrieve the EVM chain state of Hyperliquid.

### Debug & Trace APIs

Hyperliquid HyperEVM supports debug and trace APIs on both mainnet and testnet for smart contract debugging and transaction tracing. To enable these APIs, deploy a [Global Node](https://docs.chainstack.com/docs/global-elastic-node.md) with debug & trace APIs enabled. See [Debug & Trace APIs](https://docs.chainstack.com/docs/debug-and-trace-apis.md#hyperliquid) for more information.

## Hyperliquid system transactions

The default `/evm` path strips HyperCore ↔ HyperEVM transfers (system transactions) from block-shaped responses; the `/nanoreth` path includes them. Both paths exist by default on every Hyperliquid node, on mainnet and testnet. See [Hyperliquid node configuration](https://docs.chainstack.com/docs/hyperliquid-node-configuration.md) for the per-method differences.
