Skip to content

Commit

Permalink
add GetUUSDBalance method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagleft committed Oct 8, 2021
1 parent 83e8884 commit a41b07c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions utopia.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ func (c *UtopiaClient) GetBalance() (float64, error) {
return result, nil
}

// GetUUSDBalance request account UUSD balance
func (c *UtopiaClient) GetUUSDBalance() (float64, error) {
params := map[string]interface{}{
"currency": "USD",
}
result, err := c.queryResultToFloat64("getBalance", params)
if err != nil {
return 0, err
}
return result, nil
}

// CreateVoucher requests the creation of a new voucher. it returns referenceNumber
func (c *UtopiaClient) CreateVoucher(amount float64) (string, error) {
params := map[string]interface{}{
Expand Down

0 comments on commit a41b07c

Please sign in to comment.