diff --git a/config.example.json b/config.example.json deleted file mode 100644 index 38b783c..0000000 --- a/config.example.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "exchange": { - "pubkey": "", - "password": "" - } -} diff --git a/main.go b/main.go index 126feb3..fd31536 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( ) func main() { + app := newSolution() err := checkErrors( app.parseConfig, @@ -20,6 +21,26 @@ func main() { if err != nil { log.Fatalln(err) } + + // create client + client := uexchange.NewClient() + + // auth + _, err = client.Auth(uexchange.Credentials{ + AccountPublicKey: app.Config.Exchange.PublicKey, + Password: app.Config.Exchange.Password, + }) + if err != nil { + log.Fatalln(err) + } + + // get balance + balanceData, err := client.GetBalance() + if err != nil { + log.Fatalln(err) + } + log.Println(balanceData) + } func newSolution() *solution { diff --git a/templates/home.html b/templates/home.html index 04be8ec..773ad2b 100644 --- a/templates/home.html +++ b/templates/home.html @@ -3,7 +3,7 @@ {{block "head" .}} {{end}}