-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
37 lines (31 loc) · 895 Bytes
/
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
package main
import (
"log"
"github.com/daydoing/trade/cmd/backtesting"
"github.com/daydoing/trade/cmd/download"
"github.com/daydoing/trade/cmd/futures"
"github.com/daydoing/trade/cmd/monitor"
"github.com/daydoing/trade/cmd/paperwallet"
"github.com/daydoing/trade/cmd/spot"
"github.com/daydoing/trade/context"
"github.com/spf13/cobra"
)
func main() {
cmd := &cobra.Command{
Use: "traded",
Short: "Traded is a quantitative trading terminal",
}
srv, err := context.NewBotContext()
if err != nil {
log.Panic(err)
}
cmd.AddCommand(backtesting.BacktestingCommand(srv))
cmd.AddCommand(paperwallet.PaperwalletCommand(srv))
cmd.AddCommand(download.DownloadCommand(srv))
cmd.AddCommand(spot.SpotMarketCommand(srv))
cmd.AddCommand(futures.FuturesMarketCommand(srv))
cmd.AddCommand(monitor.MonitorCommand(srv))
if err := cmd.Execute(); err != nil {
log.Panic(err)
}
}