github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/examples/v1/account/main.go (about) 1 package main 2 3 // Set BFX_APIKEY and BFX_SECRET as : 4 // 5 // export BFX_API_KEY=YOUR_API_KEY 6 // export BFX_API_SECRET=YOUR_API_SECRET 7 // 8 // you can obtain it from https://www.bitfinex.com/api 9 10 import ( 11 "fmt" 12 "os" 13 14 "github.com/bitfinexcom/bitfinex-api-go/v1" 15 ) 16 17 func main() { 18 key := os.Getenv("BFX_API_KEY") 19 secret := os.Getenv("BFX_API_SECRET") 20 client := bitfinex.NewClient().Auth(key, secret) 21 info, err := client.Account.Info() 22 23 if err != nil { 24 fmt.Println(err) 25 } else { 26 fmt.Println(info) 27 } 28 }