准备解析k线图

This commit is contained in:
injoyai
2024-10-29 16:43:41 +08:00
parent f9c7047f78
commit cbb2aabb7e
6 changed files with 89 additions and 3 deletions

View File

@@ -71,13 +71,17 @@ func IntUnitString(n int) string {
return FloatUnitString(float64(n))
}
func GetTime(bs [2]byte) string {
func GetDate(bs [2]byte) string {
n := Uint16(bs[:])
h := n / 60
m := n % 60
return fmt.Sprintf("%02d:%02d", h, m)
}
func GetTime(bs [4]byte) string {
return ""
}
func basePrice(code string) Price {
if len(code) == 0 {
return 1