An open API service indexing awesome lists of open source software.

https://github.com/logarithm-labs/go-hyperliquid

A golang SDK for Hyperliquid PerpDEX.
https://github.com/logarithm-labs/go-hyperliquid

api exchange go golang hyperliquid sdk sdk-golang

Last synced: 8 months ago
JSON representation

A golang SDK for Hyperliquid PerpDEX.

Awesome Lists containing this project

README

          

# go-hyperliquid
A golang SDK for Hyperliquid API.

# API reference
- [Hyperliquid](https://app.hyperliquid.xyz/)
- [Hyperliquid API docs](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api)
- [Hyperliquid official Python SDK](https://github.com/hyperliquid-dex/hyperliquid-python-sdk)

# How to install?
```
go get github.com/Logarithm-Labs/go-hyperliquid/hyperliquid
```

# Documentation

[![GoDoc](https://godoc.org/github.com/adshao/go-binance?status.svg)](https://pkg.go.dev/github.com/Logarithm-Labs/go-hyperliquid/hyperliquid#section-documentation)

# Quick start
```
package main

import (
"log"

"github.com/Logarithm-Labs/go-hyperliquid/hyperliquid"
)

func main() {
hyperliquidClient := hyperliquid.NewHyperliquid(&hyperliquid.HyperliquidClientConfig{
IsMainnet: true,
AccountAddress: "0x12345", // Main address of the Hyperliquid account that you want to use
PrivateKey: "abc1234", // Private key of the account or API private key from Hyperliquid
})

// Get balances
res, err := hyperliquidClient.GetAccountState()
if err != nil {
log.Print(err)
}
log.Printf("GetAccountState(): %+v", res)
}
```