-
Notifications
You must be signed in to change notification settings - Fork 2
/
kayo.go
35 lines (31 loc) · 881 Bytes
/
kayo.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
package main
import (
"flag"
"github.com/workfoxes/kayo/internal/broker"
"strings"
)
type KayoWorker struct {
Name string
BrokerName string
Symbol []string
IsLive bool
Strategy string
Broker broker.StockBroker
}
var (
_broker = flag.String("broker", "Binance", "Broker : that will be used for trading")
_symbol = flag.String("symbol", "BTCUSDT", "Symbol : which will tracked and traded by bot")
_isLive = flag.Bool("live", false, "live : Is trading on the live platform")
_strategy = flag.String("strategy", "default", "strategy : will use to stick with the specific strategy")
)
func main() {
_symbols := strings.SplitAfter(*_symbol, ",")
kayo := &KayoWorker{
Name: "Kayo",
BrokerName: *_broker,
Symbol: _symbols,
IsLive: *_isLive,
Strategy: *_strategy,
}
kayo.Broker = *broker.NewBroker(kayo.BrokerName)
}