Skip to content

hlongvu/go-hyperliquid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-hyperliquid

A golang SDK for Hyperliquid PerpDEX.

API reference

How to install?

go get github.com/Logarithm-Labs/go-hyperliquid/hyperliquid

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)
}

About

A golang SDK for Hyperliquid PerpDEX.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%