github.com/bitfinexcom/bitfinex-api-go@v0.0.0-20210608095005-9e0b26f200fb/v1/balances.go (about) 1 package bitfinex 2 3 type BalancesService struct { 4 client *Client 5 } 6 7 type WalletBalance struct { 8 Type string 9 Currency string 10 Amount string 11 Available string 12 } 13 14 // GET balances 15 func (b *BalancesService) All() ([]WalletBalance, error) { 16 req, err := b.client.newAuthenticatedRequest("GET", "balances", nil) 17 if err != nil { 18 return nil, err 19 } 20 21 balances := make([]WalletBalance, 3) 22 _, err = b.client.do(req, &balances) 23 if err != nil { 24 return nil, err 25 } 26 27 return balances, nil 28 }