aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorTeddy Wing2015-06-06 20:04:35 -0400
committerTeddy Wing2015-06-06 20:04:35 -0400
commitcb49a3cee091f7eb2455bd9d0b13dc67313c5ec9 (patch)
tree1af8670e13075cae8295784a8e782a267e26d1f6 /main.go
parent3fc1e230aa94089fe96c44c9f5acdc53b0b8f083 (diff)
downloadNew-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.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..f67c3f3
--- /dev/null
+++ b/main.go
@@ -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)
+}