diff options
| author | Teddy Wing | 2015-06-06 20:04:35 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-06-06 20:04:35 -0400 |
| commit | cb49a3cee091f7eb2455bd9d0b13dc67313c5ec9 (patch) | |
| tree | 1af8670e13075cae8295784a8e782a267e26d1f6 /main.go | |
| parent | 3fc1e230aa94089fe96c44c9f5acdc53b0b8f083 (diff) | |
| download | New-House-on-the-Block-cb49a3cee091f7eb2455bd9d0b13dc67313c5ec9.tar.bz2 | |
Add main.go
Uses `coinbase-go` to get my Coinbase balance and prints it to the
console.
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +package main + +import ( + "com.teddywing/new-house-on-the-block/vendor/_nuts/github.com/fabioberger/coinbase-go" + "fmt" + "log" + "os" +) + +func main() { + c := coinbase.ApiKeyClientSandbox(os.Getenv("COINBASE_KEY"), os.Getenv("COINBASE_SECRET")) + + balance, err := c.GetBalance() + if err != nil { + log.Print(err) + } + fmt.Printf("Balance is %f BTC\n", balance) +} |
