mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
26 lines
335 B
Go
26 lines
335 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/injoyai/logs"
|
|
"github.com/injoyai/tdx"
|
|
)
|
|
|
|
func main() {
|
|
cs, err := tdx.NewCodes2()
|
|
logs.PanicErr(err)
|
|
|
|
c := cs.Get("sz000001")
|
|
|
|
fmt.Println(c.FloatStock, c.TotalStock)
|
|
|
|
for _, v := range cs.GetIndexes().Codes() {
|
|
if strings.HasPrefix(v, "sz") {
|
|
logs.Debug(v)
|
|
}
|
|
}
|
|
|
|
}
|