mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
增加PullTrade,用于拉取分时成交,然后计算成K线
This commit is contained in:
19
example/PullTrade/main.go
Normal file
19
example/PullTrade/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/injoyai/logs"
|
||||
"github.com/injoyai/tdx"
|
||||
"github.com/injoyai/tdx/extend"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
pt := extend.NewPullTrade("./data/trade")
|
||||
|
||||
m, err := tdx.NewManage(nil)
|
||||
logs.PanicErr(err)
|
||||
|
||||
err = pt.Pull(m, 2024, "sz000001")
|
||||
logs.Err(err)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user