Skip to content

Commit

Permalink
Merge pull request #1 from CtrCat/main
Browse files Browse the repository at this point in the history
Change
  • Loading branch information
UtopistMan authored Feb 3, 2022
2 parents a007d8b + af29f86 commit 43b7570
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
6 changes: 0 additions & 6 deletions config.example.json

This file was deleted.

21 changes: 21 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
)

func main() {

app := newSolution()
err := checkErrors(
app.parseConfig,
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{block "head" .}} {{end}}
<body>
<h2>Everything is working</h2>

<p><a href="pairs"> Pairs </a></p>
{{block "scripts" .}} {{end}}
</body>
</html>
1 change: 1 addition & 0 deletions templates/pairs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{block "head" .}} {{end}}
<body>
{{block "pairs" .}} {{end}}
=
{{block "scripts" .}} {{end}}
</body>
</html>

0 comments on commit 43b7570

Please sign in to comment.