Skip to content

Commit 783be2e

Browse files
Update README.md
1 parent 8e8c9c8 commit 783be2e

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
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+
```

0 commit comments

Comments
 (0)