-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
28 lines (25 loc) · 797 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
package main
import (
"cryptocurrency/app/controllers"
"cryptocurrency/config"
"cryptocurrency/utils"
"log"
)
func main() {
utils.LoggingSettings(config.Config.LogFile)
controllers.StreamIngestionData()
controllers.CleanUpRecord()
log.Println(controllers.StartWebServer())
}
// func main() {
// s := models.NewSignalEvents()
// df, _ := models.GetAllCandle("BTC_JPY", time.Minute, 10)
// c1 := df.Candles[len(df.Candles)-2]
// c2 := df.Candles[len(df.Candles)-1]
// s.Buy("BTC_JPY", c1.Time.UTC(), c1.Close, 1.0, true)
// s.Sell("BTC_JPY", c2.Time.UTC(), c2.Close, 1.0, true)
// fmt.Println(models.GetSignalEventsByCount(1))
// fmt.Println(models.GetSignalEventsAfterTime(c1.Time))
// fmt.Println(s.CollectAfter(time.Now().UTC()))
// fmt.Println(s.CollectAfter(c1.Time))
// }