-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
51 lines (40 loc) · 1.17 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"os"
"github.com/alexflint/go-arg"
"github.com/leekchan/accounting"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/touno-io/go-bitkub/bitkub"
"github.com/touno-io/go-bitkub/helper"
"github.com/touno-io/go-bitkub/market"
)
var (
symbolMoney string = "₮"
aNo accounting.Accounting = accounting.Accounting{Precision: 2, Thousand: ",", Format: "%s%v"}
)
var cli struct {
Key string `arg:"--key,-K" help:"optimization level"`
Secret string `arg:"--secret, -S" help:"optimization level"`
}
func init() {
aNo.Symbol = symbolMoney
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
zerolog.SetGlobalLevel(zerolog.TraceLevel)
if err := helper.LoadDotEnv(); err != nil {
log.Warn().Err(err)
}
// if os.Getenv("ENV") != "development" {
// log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
// }
}
func main() {
arg.MustParse(&cli)
bitkub.Initlizer(cli.Key, cli.Secret)
// bal, err := QueryBalances()
// helper.FatalError(err)
// log.Trace().Interface("Balance", bal).Send()
ord, err := market.GetUserLimits()
helper.FatalError(err)
log.Trace().Interface("ord", ord).Send()
}