-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdtypes.py
109 lines (104 loc) · 2.81 KB
/
dtypes.py
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import numpy as np
dt_Future = np.dtype([
('chWindCode', np.str_, 32),
('chCode', np.str_, 32),
('nDate', np.int32),
('nTime', np.int32),
('iVolume', np.int64),
('iTurover', np.int64),
('nSettle', np.int32),
('nPosition', np.int32),
('nCurDelta', np.int32),
('chTradeFlag', np.str_, 1),
('iAccVolume', np.int64),
('iAccTurover', np.int64),
('nHigh', np.int32),
('nLow', np.int32),
('nOpen', np.int32),
('nPrice', np.int32),
('nPreClose', np.int32),
('nPreSettle', np.int32),
('nPrePosition', np.int32)
])
dt_FutureAB = np.dtype([
('chWindCode', np.str_, 32),
('chCode', np.str_, 32),
('nDate', np.int32),
('nTime', np.int32),
('iVolume', np.int64),
('iTurover', np.int64),
('nSettle', np.int32),
('nPosition', np.int32),
('nCurDelta', np.int32),
('chTradeFlag', np.str_, 1),
('iAccVolume', np.int64),
('iAccTurover', np.int64),
('nOpen', np.int32),
('nHigh', np.int32),
('nLow', np.int32),
('nPrice', np.int32),
('nAskPrice', np.int32, 5),
('nAskVolume', np.int32, 5),
('nBidPrice', np.int32, 5),
('nBidVolume', np.int32, 5),
('nPreClose', np.int32),
('nPreSettle', np.int32),
('nPrePosition', np.int32),
])
dt_OrderQueue = np.dtype([
('chWindCode', np.str_, 32),
('chCode', np.str_, 32),
('nDate', np.int32),
('nTime', np.int32),
('nSide', np.int32),
('nPrice', np.int32),
('nOrderItems', np.int32),
('nABItems', np.int32),
('nABVolume', np.int32, 50)
])
dt_TickAB = np.dtype([
('chWindCode', np.str_, 32),
('chCode', np.str_, 32),
('nDate', np.int32),
('nTime', np.int32),
('nPrice', np.int32),
('iVolume', np.int64),
('iTurover', np.int64),
('nMatchItems', np.int32),
('nInterest', np.int32),
('chTradeFlag', np.str_, 1),
('chBSFlag', np.str_, 1),
('iAccVolume', np.int64),
('iAccTurover', np.int64),
('nHigh', np.int32),
('nLow', np.int32),
('nOpen', np.int32),
('nPreClose', np.int32),
('nAskPrice', np.int32, 10),
('nAskVolume', np.uint32, 10),
('nBidPrice', np.int32, 10),
('nBidVolume', np.uint32, 10),
('nAskAvPrice', np.int32),
('nBidAvPrice', np.int32),
('iTotalAskVolume', np.int64),
('iTotalBidVolume', np.int64),
('nIndex', np.int32),
('nStocks', np.int32),
('nUps', np.int32),
('nDowns', np.int32),
('nHoldLines', np.int32)
])
dt_Transaction = np.dtype([
('chWindCode', np.str_, 32),
('chCode', np.str_, 32),
('nDate', np.int32),
('nTime', np.int32),
('nIndex', np.int32),
('chFunctionCode', np.str_, 1),
('chOrderKind', np.str_, 1),
('chBSFlag', np.str_, 1),
('nTradePrice', np.int32),
('nTradeVolume', np.int32),
('nAskOrder', np.int32),
('nBidOrder', np.int32)
])