forked from datochan/ctdx
-
Notifications
You must be signed in to change notification settings - Fork 3
/
models.go
65 lines (60 loc) · 1.71 KB
/
models.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package ctdx
// 市场最后交易信息
type LastTradeModel struct {
ServerName string
Domain string
SZDate uint32
SZFlag uint32
SZCount uint32
SHDate uint32
SHFlag uint32
SHCount uint32
}
// 股票列表数据的文件结构
type StockBaseModel struct {
Code string // 股票代码
Name string // 股票名称
Market int // 所属市场,0深交所,1上交所
Unknown1 int // 未知 固定0x64
Unknown2 int // 未知
Unknown3 int // 未知 固定0x02
Price float64 // 价格(昨收)
Bonus1 int // 用于计算权息数据
Bonus2 int // 权息数量
}
// 股票权息数据的文件结构
type StockBonusModel struct {
Code string // 股票代码
Date int // 日期
Market int // 所属市场,0深交所,1上交所
Type int // 分红配股类型(type): 1标识除权除息, 2: 配送股上市; 3: 非流通股上市; 4:未知股本变动; 5: 股本变动,6: 增发新股, 7: 股本回购, 8: 增发新股上市, 9:转配股上市
Money float64 // 送现金
Price float64 // 配股价
Count float64 // 送股数
Rate float64 // 配股比例
}
// 日线数据的文件结构
type StockDayModel struct {
Market int
Code string
Date int
Open float64
Low float64
High float64
Close float64
Volume int
Amount float64
}
// 五分钟线数据的文件结构
type StockMinsModel struct {
Market int
Code string
Date int
Time string
Open float64
Low float64
High float64
Close float64
Volume int
Amount float64
}