File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 11# go-hyperliquid
2- A golang SDK for Hyperliquid PerpDEX.
2+ A golang SDK for [ Hyperliquid PerpDEX] ( https://hyperliquid.xyz/ ) .
3+
4+ # API reference
5+ - [ Hyperliquid API docs] ( https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api )
6+ - [ Hyperliquid official Python SDK] ( https://github.com/hyperliquid-dex/hyperliquid-python-sdk )
7+
8+ # How to install?
9+ ```
10+ go get github.com/Logarithm-Labs/go-hyperliquid/hyperliquid
11+ ```
12+
13+ # Quick start
14+ ```
15+ package main
16+
17+ import (
18+ "log"
19+
20+ "github.com/Logarithm-Labs/go-hyperliquid/hyperliquid"
21+ )
22+
23+ func main() {
24+ hyperliquidClient := hyperliquid.NewHyperliquid(&hyperliquid.HyperliquidClientConfig{
25+ IsMainnet: true,
26+ AccountAddress: "0x12345", // Main address of the Hyperliquid account that you want to use
27+ PrivateKey: "abc1234", // Private key of the account or API private key from Hyperliquid
28+ })
29+
30+ // Get balances
31+ res, err := hyperliquidClient.GetAccountState()
32+ if err != nil {
33+ log.Print(err)
34+ }
35+ log.Printf("GetAccountState(): %+v", res)
36+ }
37+ ```
You can’t perform that action at this time.
0 commit comments