OpenViSTAI · Agents · Blockchain · Crypto
Menu
Exchanges & Trading

Go Hyperliquid

Go Hyperliquid is an unofficial, open-source Go client SDK for connecting software to the Hyperliquid exchange through API requests and WebSocket channels.

Independent OpenViST project profile, based on linked sources.

Go Hyperliquid — OpenViST project profile in Exchanges & Trading.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Go service needs programmatic access to Hyperliquid API functions or WebSocket streams, rather than a user-facing exchange interface.

Who it is for

  • Go developers building backend integrations with Hyperliquid.
  • Teams creating services that consume Hyperliquid market data or use exchange operations programmatically.

Documented uses

  • Connect a Go application to Hyperliquid’s API.
  • Subscribe to streaming market data or user events.
  • Integrate documented order, position, account and asset-management operations into an application.
Before you choose

Requirements & limits

The repository is public and identifies the project as MIT-licensed open-source software. Installation is documented through Go modules.

  • The client is unofficial; the README says it follows patterns of Hyperliquid’s Python SDK.
  • The README lists broad trading, account, asset and WebSocket functionality; check package and API documentation for the precise operation your integration needs.
  • The example trading setup uses a private key and account-related values, while a market-data subscription is shown through a WebSocket client.
  • The project is a Go integration library, not an exchange website or trading application.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the Go Hyperliquid SDK

Add the SDK as a dependency in a Go project.

Before you start

  • A Go project with Go tooling available.

Steps

  1. From the project, run the command below.

    Documented command
    go get github.com/sonirico/go-hyperliquid
  2. Import the package in your Go code as github.com/sonirico/go-hyperliquid (the README example aliases it as hyperliquid).

Expected outcome

The SDK is added to the project for use as a Hyperliquid API and WebSocket client.

Guide limitations

  • This covers installation only; it does not configure or verify a connection.
Source-based practical guide

Connect to Hyperliquid and subscribe to BTC trades

Use the SDK example pattern to connect a WebSocket client and register a BTC trades subscription.

Before you start

  • The SDK is installed in a Go project.
  • The Hyperliquid SDK’s WebSocket client and subscription types are available.

Steps

  1. Create a client with hyperliquid.NewWebsocketClient(hyperliquid.MainnetAPIURL).

  2. Call ws.Connect(context.Background()) and handle any returned error.

  3. Defer ws.Close() after connecting.

  4. Call ws.Subscribe with a subscription whose Type is trades and Coin is BTC, and provide a callback to process messages.

Expected outcome

The example registers a BTC trades subscription and prints received messages in its callback.

Guide limitations

  • The README example does not specify authentication requirements, reconnection behavior, or guarantees that messages will arrive.
  • The callback’s message type is shown as hyperliquid.wsMessage in the README example; consult package documentation for API details.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
sonirico/go-hyperliquid · Official homepage title · retained in its source language