├── lib
├── 说明.txt
├── dll
│ ├── StockDll.dll
│ └── StockDll.XML
└── 梦翔.Net通视股票接口V1.0.chm
├── README.md
├── src
├── QuantBox.OQ.TongShi
│ ├── DataRecord.cs
│ ├── APIProvider.Settings.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── APIProvider.MarketDataProvider.OQ3.cs
│ ├── QuantBox.OQ.TongShi.csproj
│ ├── StructRcvReportEx.cs
│ ├── APIProvider.Provider.cs
│ ├── APIProvider.InstrumentProvider.cs
│ ├── APIProvider.MarketDataProvider.cs
│ └── APIProvider.TongShi.cs
├── QuantBox.Helper.TongShi
│ ├── TongShiTrade.cs
│ ├── TongShiQuote.cs
│ ├── DataConvert.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── QuantBox.Helper.TongShi.csproj
└── QuantBox.OQ.TongShi.sln
├── .gitattributes
└── .gitignore
/lib/说明.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuantBox/OpenQuant-TongShi/HEAD/lib/说明.txt
--------------------------------------------------------------------------------
/lib/dll/StockDll.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuantBox/OpenQuant-TongShi/HEAD/lib/dll/StockDll.dll
--------------------------------------------------------------------------------
/lib/梦翔.Net通视股票接口V1.0.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuantBox/OpenQuant-TongShi/HEAD/lib/梦翔.Net通视股票接口V1.0.chm
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OpenQuant通视股票行情插件
2 |
3 | ## 目的
4 | 提供OpenQuant对接通视标准的行情源,如银江网络\网际网\数畅等
5 |
6 | ## 版权声明
7 | 通过网友‘梦翔’的授权,在本插件中集成了梦翔.Net通视股票接口
8 | 此接口个人用户可以免费使用,商业用途请联系梦翔,细节请参考lib目录
9 |
10 | ## 其它
11 | 通视接口是最早期时,股票行情接收的全推接口
12 |
13 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/DataRecord.cs:
--------------------------------------------------------------------------------
1 | using SmartQuant.Instruments;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace QuantBox.OQ.TongShi
8 | {
9 | class DataRecord
10 | {
11 | public string Symbol;
12 | public string Exchange;
13 | public Instrument Instrument;
14 | public bool TradeRequested;
15 | public bool QuoteRequested;
16 | public bool MarketDepthRequested;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/src/QuantBox.Helper.TongShi/TongShiTrade.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using SmartQuant.Data;
4 | using StockDll;
5 |
6 | namespace QuantBox.Helper.TongShi
7 | {
8 | public class TongShiTrade : Trade
9 | {
10 | public TongShiTrade()
11 | : base()
12 | {
13 | }
14 |
15 | public TongShiTrade(Trade trade)
16 | : base(trade)
17 | {
18 | }
19 |
20 | public TongShiTrade(DateTime datetime, double price, int size)
21 | : base(datetime, price, size)
22 | {
23 | }
24 |
25 | public StructRcvReport DepthMarketData;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/QuantBox.Helper.TongShi/TongShiQuote.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using SmartQuant.Data;
4 | using StockDll;
5 |
6 | namespace QuantBox.Helper.TongShi
7 | {
8 | public class TongShiQuote : Quote
9 | {
10 | public TongShiQuote()
11 | : base()
12 | {
13 | }
14 |
15 | public TongShiQuote(Quote quote)
16 | : base(quote)
17 | {
18 | }
19 |
20 | public TongShiQuote(DateTime datetime, double bid, int bidSize, double ask, int askSize)
21 | : base(datetime, bid, bidSize, ask, askSize)
22 | {
23 | }
24 |
25 | public StructRcvReport DepthMarketData;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.Settings.cs:
--------------------------------------------------------------------------------
1 | using NLog;
2 | using NLog.Config;
3 | using SmartQuant;
4 | using SmartQuant.Providers;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel;
8 | using System.Linq;
9 | using System.Text;
10 |
11 | namespace QuantBox.OQ.TongShi
12 | {
13 | partial class APIProvider
14 | {
15 | private const string CATEGORY_ACCOUNT = "Account";
16 | private const string CATEGORY_BARFACTORY = "Bar Factory";
17 | private const string CATEGORY_DEBUG = "Debug";
18 | private const string CATEGORY_EXECUTION = "Settings - Execution";
19 | private const string CATEGORY_HISTORICAL = "Settings - Historical Data";
20 | private const string CATEGORY_INFO = "Information";
21 | private const string CATEGORY_NETWORK = "Settings - Network";
22 | private const string CATEGORY_STATUS = "Status";
23 | private const string CATEGORY_TIME = "Settings - Time";
24 | private const string CATEGORY_OTHER = "Settings - Other";
25 |
26 | [Category(CATEGORY_OTHER)]
27 | [Editor(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
28 | public string StockDllPath { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/QuantBox.Helper.TongShi/DataConvert.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using StockDll;
3 |
4 | namespace QuantBox.Helper.TongShi
5 | {
6 | public class DataConvert
7 | {
8 | static FieldInfo tradeField;
9 | static FieldInfo quoteField;
10 |
11 | public static bool TryConvert(OpenQuant.API.Trade trade, ref StructRcvReport DepthMarketData)
12 | {
13 | if (tradeField == null)
14 | {
15 | tradeField = typeof(OpenQuant.API.Trade).GetField("trade", BindingFlags.NonPublic | BindingFlags.Instance);
16 | }
17 |
18 | TongShiTrade t = tradeField.GetValue(trade) as TongShiTrade;
19 | if (null != t)
20 | {
21 | DepthMarketData = t.DepthMarketData;
22 | return true;
23 | }
24 | return false;
25 | }
26 |
27 | public static bool TryConvert(OpenQuant.API.Quote quote, ref StructRcvReport DepthMarketData)
28 | {
29 | if (quoteField == null)
30 | {
31 | quoteField = typeof(OpenQuant.API.Quote).GetField("quote", BindingFlags.NonPublic | BindingFlags.Instance);
32 | }
33 |
34 | TongShiQuote q = quoteField.GetValue(quote) as TongShiQuote;
35 | if (null != q)
36 | {
37 | DepthMarketData = q.DepthMarketData;
38 | return true;
39 | }
40 | return false;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuantBox.OQ.TongShi", "QuantBox.OQ.TongShi\QuantBox.OQ.TongShi.csproj", "{2336052E-158D-438B-AE9B-75DACD81AA16}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuantBox.Helper.TongShi", "QuantBox.Helper.TongShi\QuantBox.Helper.TongShi.csproj", "{4E569465-D4BD-4833-B1CB-02B794A549FD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {2336052E-158D-438B-AE9B-75DACD81AA16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {2336052E-158D-438B-AE9B-75DACD81AA16}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {2336052E-158D-438B-AE9B-75DACD81AA16}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {2336052E-158D-438B-AE9B-75DACD81AA16}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {4E569465-D4BD-4833-B1CB-02B794A549FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {4E569465-D4BD-4833-B1CB-02B794A549FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {4E569465-D4BD-4833-B1CB-02B794A549FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {4E569465-D4BD-4833-B1CB-02B794A549FD}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("QuantBox.OQ.TongShi")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("QuantBox.OQ.TongShi")]
13 | [assembly: AssemblyCopyright("Copyright © 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("4870add0-74e1-40a1-82de-1be241f7fc27")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.4")]
36 | [assembly: AssemblyFileVersion("1.0.0.4")]
37 |
--------------------------------------------------------------------------------
/src/QuantBox.Helper.TongShi/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("QuantBox.Helper.TongShi")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("QuantBox.Helper.TongShi")]
13 | [assembly: AssemblyCopyright("Copyright © 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e1e12556-ec13-4bc2-a534-769c1cdea0cc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/QuantBox.Helper.TongShi/QuantBox.Helper.TongShi.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {4E569465-D4BD-4833-B1CB-02B794A549FD}
8 | Library
9 | Properties
10 | QuantBox.Helper.TongShi
11 | QuantBox.Helper.TongShi
12 | v4.0
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | ..\..\bin\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Bin\OpenQuant.API.dll
35 |
36 |
37 | ..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.Data.dll
38 |
39 |
40 | ..\..\..\..\GitHub\OpenQuant-TongShi\lib\dll\StockDll.dll
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 |
46 | [Dd]ebug/
47 | [Rr]elease/
48 | x64/
49 | build/
50 | [Bb]in/
51 | [Oo]bj/
52 |
53 | # MSTest test Results
54 | [Tt]est[Rr]esult*/
55 | [Bb]uild[Ll]og.*
56 |
57 | *_i.c
58 | *_p.c
59 | *.ilk
60 | *.meta
61 | *.obj
62 | *.pch
63 | *.pdb
64 | *.pgc
65 | *.pgd
66 | *.rsp
67 | *.sbr
68 | *.tlb
69 | *.tli
70 | *.tlh
71 | *.tmp
72 | *.tmp_proj
73 | *.log
74 | *.vspscc
75 | *.vssscc
76 | .builds
77 | *.pidb
78 | *.log
79 | *.scc
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 | *.cachefile
88 |
89 | # Visual Studio profiler
90 | *.psess
91 | *.vsp
92 | *.vspx
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 |
101 | # TeamCity is a build add-in
102 | _TeamCity*
103 |
104 | # DotCover is a Code Coverage Tool
105 | *.dotCover
106 |
107 | # NCrunch
108 | *.ncrunch*
109 | .*crunch*.local.xml
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.Publish.xml
129 | *.pubxml
130 |
131 | # NuGet Packages Directory
132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133 | #packages/
134 |
135 | # Windows Azure Build Output
136 | csx
137 | *.build.csdef
138 |
139 | # Windows Store app package directory
140 | AppPackages/
141 |
142 | # Others
143 | sql/
144 | *.Cache
145 | ClientBin/
146 | [Ss]tyle[Cc]op.*
147 | ~$*
148 | *~
149 | *.dbmdl
150 | *.[Pp]ublish.xml
151 | *.pfx
152 | *.publishsettings
153 |
154 | # RIA/Silverlight projects
155 | Generated_Code/
156 |
157 | # Backup & report files from converting an old project file to a newer
158 | # Visual Studio version. Backup files are not needed, because we have git ;-)
159 | _UpgradeReport_Files/
160 | Backup*/
161 | UpgradeLog*.XML
162 | UpgradeLog*.htm
163 |
164 | # SQL Server files
165 | App_Data/*.mdf
166 | App_Data/*.ldf
167 |
168 | #############
169 | ## Windows detritus
170 | #############
171 |
172 | # Windows image file caches
173 | Thumbs.db
174 | ehthumbs.db
175 |
176 | # Folder config file
177 | Desktop.ini
178 |
179 | # Recycle Bin used on file shares
180 | $RECYCLE.BIN/
181 |
182 | # Mac crap
183 | .DS_Store
184 |
185 |
186 | #############
187 | ## Python
188 | #############
189 |
190 | *.py[co]
191 |
192 | # Packages
193 | *.egg
194 | *.egg-info
195 | dist/
196 | build/
197 | eggs/
198 | parts/
199 | var/
200 | sdist/
201 | develop-eggs/
202 | .installed.cfg
203 |
204 | # Installer logs
205 | pip-log.txt
206 |
207 | # Unit test / coverage reports
208 | .coverage
209 | .tox
210 |
211 | #Translations
212 | *.mo
213 |
214 | #Mr Developer
215 | .mr.developer.cfg
216 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.MarketDataProvider.OQ3.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SmartQuant.Data;
7 | using SmartQuant.FIX;
8 | using SmartQuant.Instruments;
9 | using SmartQuant.Providers;
10 |
11 | namespace QuantBox.OQ.TongShi
12 | {
13 | public partial class APIProvider : IMarketDataProvider, ISimulationMarketDataProvider
14 | {
15 | private void OnNewBar(object sender, BarEventArgs args)
16 | {
17 | if (NewBar != null)
18 | {
19 | Bar bar = args.Bar;
20 |
21 | if (null != MarketDataFilter)
22 | {
23 | Bar b = MarketDataFilter.FilterBar(bar, args.Instrument.Symbol);
24 | if (null != b)
25 | {
26 | NewBar(this, new BarEventArgs(b, args.Instrument, this));
27 | }
28 | }
29 | else
30 | {
31 | NewBar(this, new BarEventArgs(bar, args.Instrument, this));
32 | }
33 | }
34 | }
35 |
36 | private void OnNewBarOpen(object sender, BarEventArgs args)
37 | {
38 | if (NewBarOpen != null)
39 | {
40 | Bar bar = args.Bar;
41 |
42 | if (null != MarketDataFilter)
43 | {
44 | Bar b = MarketDataFilter.FilterBarOpen(bar, args.Instrument.Symbol);
45 | if (null != b)
46 | {
47 | NewBarOpen(this, new BarEventArgs(b, args.Instrument, this));
48 | }
49 | }
50 | else
51 | {
52 | NewBarOpen(this, new BarEventArgs(bar, args.Instrument, this));
53 | }
54 | }
55 | }
56 |
57 | private void EmitNewQuoteEvent(IFIXInstrument instrument, Quote quote)
58 | {
59 | if (this.MarketDataFilter != null)
60 | {
61 | quote = this.MarketDataFilter.FilterQuote(quote, instrument.Symbol);
62 | }
63 |
64 | if (quote != null)
65 | {
66 | if (NewQuote != null)
67 | {
68 | NewQuote(this, new QuoteEventArgs(quote, instrument, this));
69 | }
70 | if (factory != null)
71 | {
72 | factory.OnNewQuote(instrument, quote);
73 | }
74 | }
75 | }
76 |
77 | private void EmitNewTradeEvent(IFIXInstrument instrument, Trade trade)
78 | {
79 | if (this.MarketDataFilter != null)
80 | {
81 | trade = this.MarketDataFilter.FilterTrade(trade, instrument.Symbol);
82 | }
83 |
84 | if (trade != null)
85 | {
86 | if (NewTrade != null)
87 | {
88 | NewTrade(this, new TradeEventArgs(trade, instrument, this));
89 | }
90 | if (factory != null)
91 | {
92 | factory.OnNewTrade(instrument, trade);
93 | }
94 | }
95 | }
96 |
97 | #region OpenQuant3接口的新方法
98 | public IMarketDataFilter MarketDataFilter { get; set; }
99 |
100 | public void EmitQuote(IFIXInstrument instrument, Quote quote)
101 | {
102 | EmitNewQuoteEvent(instrument, quote);
103 | }
104 |
105 | public void EmitTrade(IFIXInstrument instrument, Trade trade)
106 | {
107 | EmitNewTradeEvent(instrument, trade);
108 | }
109 | #endregion
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/QuantBox.OQ.TongShi.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2336052E-158D-438B-AE9B-75DACD81AA16}
8 | Library
9 | Properties
10 | QuantBox.OQ.TongShi
11 | QuantBox.OQ.TongShi
12 | v4.0
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | ..\..\..\..\..\..\..\Program Files %28x86%29\SmartQuant Ltd\OpenQuant\Framework\bin\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 | x86
24 |
25 |
26 | pdbonly
27 | true
28 | ..\..\bin\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 | False
36 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Bin\NLog.dll
37 |
38 |
39 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.dll
40 |
41 |
42 | False
43 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.Data.dll
44 |
45 |
46 | False
47 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.FIX.dll
48 |
49 |
50 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.Instruments.dll
51 |
52 |
53 | ..\..\..\..\..\..\..\Program Files (x86)\SmartQuant Ltd\OpenQuant\Framework\bin\SmartQuant.Providers.dll
54 |
55 |
56 | ..\..\..\lib\dll\StockDll.dll
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 | {4e569465-d4bd-4833-b1cb-02b794a549fd}
85 | QuantBox.Helper.TongShi
86 |
87 |
88 |
89 |
96 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/StructRcvReportEx.cs:
--------------------------------------------------------------------------------
1 | using SmartQuant.FIX;
2 | using StockDll;
3 | using System;
4 | using NLog;
5 |
6 | namespace QuantBox.OQ.TongShi
7 | {
8 | public class StructRcvReportEx
9 | {
10 | private static readonly Logger mdlog = LogManager.GetLogger("TongShi.M");
11 |
12 | string[,] CodeCover = {
13 | {"1A0001","000001"},
14 | {"1A0002","000002"},
15 | {"1A0003","000003"},
16 | {"1B0001","000004"},
17 | {"1B0002","000005"},
18 | {"1B0004","000006"},
19 | {"1B0005","000007"},
20 | {"1B0006","000008"},
21 | {"1B0007","000010"},
22 | {"1B0008","000011"},
23 | {"1B0009","000012"},
24 | {"1B0010","000013"},
25 | {"1B0015","000015"},
26 | {"1B0016","000016"},
27 | {"1B0017","000017"},
28 |
29 | };
30 |
31 | public StructRcvReportEx(StructRcvReport RcvReport)
32 | {
33 | this.RcvReport = RcvReport;
34 | newSymbol = GetNewSymbol(RcvReport.StockCode);
35 | yahooExchange = GetYahooSecurityExchange(RcvReport.MarketType);
36 | securityType = GetSecurityType();
37 | }
38 |
39 | public StructRcvReport RcvReport { get; private set; }
40 | public string newSymbol;
41 | public string yahooExchange;
42 | public string securityType;
43 |
44 | private string GetNewSymbol(string symbol)
45 | {
46 | if (symbol[1] >= 'A')
47 | {
48 | for (int i = 0; i < 15; ++i)
49 | {
50 | if (symbol.CompareTo(CodeCover[i, 0]) == 0)
51 | {
52 | return CodeCover[i, 1];
53 | }
54 | }
55 | }
56 | return symbol;
57 | }
58 |
59 | private string GetYahooSecurityExchange(string MarketType)
60 | {
61 | if (MarketType == "SH")
62 | {
63 | return "SS";
64 | }
65 | return MarketType;
66 | }
67 |
68 | private string GetSecurityType()
69 | {
70 | if (yahooExchange == "SZ")
71 | {
72 | return GetSecurityTypeSZ(newSymbol);
73 | }
74 | else if (yahooExchange == "SS")
75 | {
76 | return GetSecurityTypeSS(newSymbol);
77 | }
78 | return FIXSecurityType.CommonStock;
79 | }
80 |
81 | private string GetSecurityTypeSS(string stockCode)
82 | {
83 | string securityType = FIXSecurityType.NoSecurityType;
84 | try
85 | {
86 | int i = Convert.ToInt32(stockCode.Substring(0, 3));
87 | if (i == 0)
88 | {
89 | securityType = FIXSecurityType.Index;
90 | }
91 | else if (i < 399)
92 | {
93 | securityType = FIXSecurityType.USTreasuryBond;
94 | }
95 | else if (i < 599)
96 | {
97 | securityType = FIXSecurityType.USTreasuryBond;
98 | }
99 | else if (i < 699)
100 | {
101 | securityType = FIXSecurityType.CommonStock;
102 | }
103 | else if (i < 700)
104 | {
105 | securityType = FIXSecurityType.ExchangeTradedFund;
106 | }
107 | else
108 | {
109 | securityType = FIXSecurityType.CommonStock;
110 | }
111 | }
112 | catch (Exception ex)
113 | {
114 | mdlog.Warn("异常信息:{0}, 代码名:{1}", ex.Message, stockCode);
115 | }
116 |
117 | return securityType;
118 | }
119 |
120 | private string GetSecurityTypeSZ(string stockCode)
121 | {
122 | string securityType = FIXSecurityType.NoSecurityType;
123 | try
124 | {
125 | int i = Convert.ToInt32(stockCode.Substring(0, 2));
126 | if (i < 10)
127 | {
128 | securityType = FIXSecurityType.CommonStock;
129 | }
130 | else if (i < 15)
131 | {
132 | securityType = FIXSecurityType.USTreasuryBond;
133 | }
134 | else if (i < 20)
135 | {
136 | securityType = FIXSecurityType.ExchangeTradedFund;
137 | }
138 | else if (i < 30)
139 | {
140 | securityType = FIXSecurityType.CommonStock;
141 | }
142 | else if (i < 39)
143 | {
144 | securityType = FIXSecurityType.CommonStock;
145 | }
146 | else if (i == 39)
147 | {
148 | securityType = FIXSecurityType.Index;
149 | }
150 | else
151 | {
152 | securityType = FIXSecurityType.NoSecurityType;
153 | }
154 | }
155 | catch (Exception ex)
156 | {
157 | mdlog.Warn("异常信息:{0}, 代码名:{1}", ex.Message, stockCode);
158 | }
159 |
160 | return securityType;
161 | }
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.Provider.cs:
--------------------------------------------------------------------------------
1 | using NLog;
2 | using NLog.Config;
3 | using SmartQuant;
4 | using SmartQuant.Providers;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel;
8 | using System.Linq;
9 | using System.Reflection;
10 | using System.Text;
11 |
12 | namespace QuantBox.OQ.TongShi
13 | {
14 | public partial class APIProvider : IProvider, IDisposable
15 | {
16 | private ProviderStatus status;
17 | private bool isConnected;
18 |
19 | public event EventHandler Connected;
20 | public event EventHandler Disconnected;
21 | public event ProviderErrorEventHandler Error;
22 |
23 | private bool disposed;
24 |
25 | private static readonly Logger mdlog = LogManager.GetLogger("TongShi.M");
26 | private static readonly Logger htlog = LogManager.GetLogger("TongShi.H");
27 |
28 | // Use C# destructor syntax for finalization code.
29 | ~APIProvider()
30 | {
31 | // Simply call Dispose(false).
32 | Dispose(false);
33 | }
34 |
35 | public APIProvider()
36 | {
37 | try
38 | {
39 | LogManager.Configuration = new XmlLoggingConfiguration(@"Bin/QuantBox.nlog");
40 | }
41 | catch (Exception ex)
42 | {
43 | mdlog.Warn(ex.Message);
44 | }
45 |
46 | BarFactory = new SmartQuant.Providers.BarFactory();
47 | status = ProviderStatus.Unknown;
48 | SmartQuant.Providers.ProviderManager.Add(this);
49 | }
50 |
51 | //Implement IDisposable.
52 | public void Dispose()
53 | {
54 | Dispose(true);
55 | GC.SuppressFinalize(this);
56 | }
57 |
58 | protected virtual void Dispose(bool disposing)
59 | {
60 | if (!disposed)
61 | {
62 | if (disposing)
63 | {
64 | // Free other state (managed objects).
65 | }
66 | // Free your own state (unmanaged objects).
67 | // Set large fields to null.
68 | Shutdown();
69 | disposed = true;
70 | }
71 | //base.Dispose(disposing);
72 | }
73 |
74 | #region IProvider
75 | [Category(CATEGORY_INFO)]
76 | public byte Id//不能与已经安装的插件ID重复
77 | {
78 | get { return 60; }
79 | }
80 |
81 | [Category(CATEGORY_INFO)]
82 | public string Name
83 | {
84 | get { return "TongShi"; }//不能与已经安装的插件Name重复
85 | }
86 |
87 | [Category(CATEGORY_INFO)]
88 | public string Title
89 | {
90 | get { return "QuantBox TongShi Provider"; }
91 | }
92 |
93 | [Category(CATEGORY_INFO)]
94 | public string URL
95 | {
96 | get { return "www.quantbox.cn"; }
97 | }
98 |
99 | [Category(CATEGORY_INFO)]
100 | [Description("插件版本信息")]
101 | public string Version
102 | {
103 | get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
104 | }
105 |
106 | [Category(CATEGORY_STATUS)]
107 | public bool IsConnected
108 | {
109 | get { return isConnected; }
110 | }
111 |
112 | [Category(CATEGORY_STATUS)]
113 | public ProviderStatus Status
114 | {
115 | get { return status; }
116 | }
117 |
118 | public void Connect(int timeout)
119 | {
120 | Connect();
121 | ProviderManager.WaitConnected(this, timeout);
122 | }
123 |
124 | public void Connect()
125 | {
126 | //_Connect();
127 | InitStockService();
128 | try
129 | {
130 | mdlog.Info("正在启动【设置的】通视接口……");
131 | if (StockService != null)
132 | StockService.Init(StockDllPath, 2000);
133 |
134 | ChangeStatus(ProviderStatus.LoggedIn);
135 | isConnected = true;
136 | EmitConnectedEvent();
137 | }
138 | catch (Exception e)
139 | {
140 | mdlog.Warn(e.Message);
141 | try
142 | {
143 | mdlog.Info("正在启动【默认的】通视接口……");
144 | if (StockService != null)
145 | StockService.Init();
146 |
147 | ChangeStatus(ProviderStatus.LoggedIn);
148 | isConnected = true;
149 | EmitConnectedEvent();
150 | }
151 | catch (Exception ex)
152 | {
153 | mdlog.Warn(ex.Message);
154 | mdlog.Info("请检查是否安装好对应的接口,或StockDllPath设置是否正确");
155 | }
156 | }
157 | }
158 |
159 | public void Disconnect()
160 | {
161 | //_Disconnect();
162 | if (StockService != null)
163 | StockService.Quit();
164 |
165 | ChangeStatus(ProviderStatus.Disconnected);
166 | isConnected = false;
167 | EmitDisconnectedEvent();
168 | }
169 |
170 | public void Shutdown()
171 | {
172 | Disconnect();
173 |
174 | //SettingsChanged();
175 |
176 | //timerConnect.Elapsed -= timerConnect_Elapsed;
177 | //timerDisconnect.Elapsed -= timerDisconnect_Elapsed;
178 | //timerAccount.Elapsed -= timerAccount_Elapsed;
179 | //timerPonstion.Elapsed -= timerPonstion_Elapsed;
180 | }
181 |
182 | public event EventHandler StatusChanged;
183 |
184 | private void ChangeStatus(ProviderStatus status)
185 | {
186 | this.status = status;
187 | EmitStatusChangedEvent();
188 | }
189 |
190 | private void EmitStatusChangedEvent()
191 | {
192 | if (StatusChanged != null)
193 | {
194 | StatusChanged(this, EventArgs.Empty);
195 | }
196 | }
197 |
198 | private void EmitConnectedEvent()
199 | {
200 | if (Connected != null)
201 | {
202 | Connected(this, EventArgs.Empty);
203 | }
204 | }
205 |
206 | private void EmitDisconnectedEvent()
207 | {
208 | if (Disconnected != null)
209 | {
210 | Disconnected(this, EventArgs.Empty);
211 | }
212 | }
213 |
214 | private void EmitError(int id, int code, string message)
215 | {
216 | if (Error != null)
217 | Error(new ProviderErrorEventArgs(new ProviderError(Clock.Now, this, id, code, message)));
218 | }
219 | #endregion
220 | }
221 | }
222 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.InstrumentProvider.cs:
--------------------------------------------------------------------------------
1 | using SmartQuant.FIX;
2 | using SmartQuant.Providers;
3 | using StockDll;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Globalization;
7 | using System.Text.RegularExpressions;
8 |
9 | namespace QuantBox.OQ.TongShi
10 | {
11 | public partial class APIProvider : IInstrumentProvider
12 | {
13 | public event SecurityDefinitionEventHandler SecurityDefinition;
14 |
15 | public void SendSecurityDefinitionRequest(FIXSecurityDefinitionRequest request)
16 | {
17 | lock (_dictDepthMarketData)
18 | {
19 | string symbol = request.ContainsField(EFIXField.Symbol) ? request.Symbol : null;
20 | string securityType = request.ContainsField(EFIXField.SecurityType) ? request.SecurityType : null;
21 | string securityExchange = request.ContainsField(EFIXField.SecurityExchange) ? request.SecurityExchange : null;
22 |
23 |
24 | #region 过滤
25 | List list = new List();
26 | foreach (StructRcvReport inst in _dictDepthMarketData.Values)
27 | {
28 | StructRcvReportEx ex = new StructRcvReportEx(inst);
29 |
30 | int flag = 0;
31 | if (null == symbol)
32 | {
33 | ++flag;
34 | }
35 | else if (ex.newSymbol.ToUpper().StartsWith(symbol.ToUpper()))
36 | {
37 | ++flag;
38 | }
39 |
40 | if (null == securityExchange)
41 | {
42 | ++flag;
43 | }
44 | else if (ex.yahooExchange.StartsWith(securityExchange.ToUpper()))
45 | {
46 | ++flag;
47 | }
48 |
49 | if (null == securityType)
50 | {
51 | ++flag;
52 | }
53 | else
54 | {
55 | if (securityType == ex.securityType)
56 | {
57 | ++flag;
58 | }
59 | }
60 |
61 | if (3 == flag)
62 | {
63 | list.Add(ex);
64 | }
65 | }
66 | #endregion
67 |
68 | list.Sort(SortCThostFtdcInstrumentField);
69 |
70 | //如果查出的数据为0,应当想法立即返回
71 | if (0 == list.Count)
72 | {
73 | FIXSecurityDefinition definition = new FIXSecurityDefinition
74 | {
75 | SecurityReqID = request.SecurityReqID,
76 | SecurityResponseID = request.SecurityReqID,
77 | SecurityResponseType = request.SecurityRequestType,
78 | TotNoRelatedSym = 1//有个除0错误的问题
79 | };
80 | if (SecurityDefinition != null)
81 | {
82 | SecurityDefinition(this, new SecurityDefinitionEventArgs(definition));
83 | }
84 | }
85 |
86 | foreach (StructRcvReportEx inst in list)
87 | {
88 | FIXSecurityDefinition definition = new FIXSecurityDefinition
89 | {
90 | SecurityReqID = request.SecurityReqID,
91 | //SecurityResponseID = request.SecurityReqID,
92 | SecurityResponseType = request.SecurityRequestType,
93 | TotNoRelatedSym = list.Count
94 | };
95 |
96 | {
97 | definition.AddField(EFIXField.SecurityType, inst.securityType);
98 | }
99 | {
100 | //double x = inst.PriceTick;
101 | //if (x > 0.0001)
102 | //{
103 | // int i = 0;
104 | // for (; x - (int)x != 0; ++i)
105 | // {
106 | // x = x * 10;
107 | // }
108 | // definition.AddField(EFIXField.PriceDisplay, string.Format("F{0}", i));
109 | // definition.AddField(EFIXField.TickSize, inst.PriceTick);
110 | //}
111 | }
112 |
113 | definition.AddField(EFIXField.Symbol, GetYahooSymbol(inst.newSymbol, inst.yahooExchange));
114 | definition.AddField(EFIXField.SecurityExchange, inst.yahooExchange);
115 | definition.AddField(EFIXField.Currency, "CNY");//Currency.CNY
116 | definition.AddField(EFIXField.SecurityDesc, inst.RcvReport.StockName);
117 |
118 | FIXSecurityAltIDGroup group = new FIXSecurityAltIDGroup();
119 | group.SecurityAltID = inst.RcvReport.StockCode;
120 | group.SecurityAltExchange = inst.RcvReport.MarketType;
121 | group.SecurityAltIDSource = this.Name;
122 |
123 | definition.AddGroup(group);
124 |
125 | //还得补全内容
126 |
127 | if (SecurityDefinition != null)
128 | {
129 | SecurityDefinition(this, new SecurityDefinitionEventArgs(definition));
130 | }
131 | }
132 | }
133 | }
134 |
135 | private int SortCThostFtdcInstrumentField(StructRcvReportEx a1, StructRcvReportEx a2)
136 | {
137 | string s1 = a1.newSymbol;
138 | string s2 = a2.newSymbol;
139 |
140 | return s1.CompareTo(s2);
141 | }
142 | #region 证券接口
143 |
144 |
145 | /*
146 | * 上海证券交易所证券代码分配规则
147 | * http://www.docin.com/p-417422186.html
148 | *
149 | * http://wenku.baidu.com/view/f2e9ddf77c1cfad6195fa706.html
150 | */
151 |
152 | private string GetYahooSymbol(string InstrumentID, string ExchangeID)
153 | {
154 | return string.Format("{0}.{1}", InstrumentID, ExchangeID.Substring(0, 2));
155 | }
156 |
157 | private string GetApiSymbol(string Symbol)
158 | {
159 | var match = Regex.Match(Symbol, @"(\d+)\.(\w+)");
160 | if (match.Success)
161 | {
162 | var code = match.Groups[1].Value;
163 | return code;
164 | }
165 | return Symbol;
166 | }
167 |
168 | private string GetApiExchange(string Symbol)
169 | {
170 | var match = Regex.Match(Symbol, @"(\d+)\.(\w+)");
171 | if (match.Success)
172 | {
173 | var code = match.Groups[2].Value;
174 | return code;
175 | }
176 | return Symbol;
177 | }
178 | #endregion
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.MarketDataProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using SmartQuant.Data;
7 | using SmartQuant.FIX;
8 | using SmartQuant.Instruments;
9 | using SmartQuant.Providers;
10 | using System.ComponentModel;
11 |
12 | namespace QuantBox.OQ.TongShi
13 | {
14 | public partial class APIProvider : IMarketDataProvider
15 | {
16 | private IBarFactory factory;
17 |
18 | public event MarketDataRequestRejectEventHandler MarketDataRequestReject;
19 | public event MarketDataSnapshotEventHandler MarketDataSnapshot;
20 | public event BarEventHandler NewBar;
21 | public event BarEventHandler NewBarOpen;
22 | public event BarSliceEventHandler NewBarSlice;
23 | public event CorporateActionEventHandler NewCorporateAction;
24 | public event FundamentalEventHandler NewFundamental;
25 | public event BarEventHandler NewMarketBar;
26 | public event MarketDataEventHandler NewMarketData;
27 | public event MarketDepthEventHandler NewMarketDepth;
28 | public event QuoteEventHandler NewQuote;
29 | public event TradeEventHandler NewTrade;
30 |
31 | #region IMarketDataProvider
32 | [Category(CATEGORY_BARFACTORY)]
33 | public IBarFactory BarFactory
34 | {
35 | get
36 | {
37 | return factory;
38 | }
39 | set
40 | {
41 | if (factory != null)
42 | {
43 | factory.NewBar -= OnNewBar;
44 | factory.NewBarOpen -= OnNewBarOpen;
45 | factory.NewBarSlice -= OnNewBarSlice;
46 | }
47 | factory = value;
48 | if (factory != null)
49 | {
50 | factory.NewBar += OnNewBar;
51 | factory.NewBarOpen += OnNewBarOpen;
52 | factory.NewBarSlice += OnNewBarSlice;
53 | }
54 | }
55 | }
56 |
57 | private void OnNewBarSlice(object sender, BarSliceEventArgs args)
58 | {
59 | if (NewBarSlice != null)
60 | {
61 | NewBarSlice(this, new BarSliceEventArgs(args.BarSize, this));
62 | }
63 | }
64 |
65 | public void SendMarketDataRequest(FIXMarketDataRequest request)
66 | {
67 | //if (!_bMdConnected)
68 | //{
69 | // EmitError(-1, -1, "行情服务器没有连接");
70 | // mdlog.Error("行情服务器没有连接");
71 | // return;
72 | //}
73 |
74 | bool bSubscribe = false;
75 | bool bTrade = false;
76 | bool bQuote = false;
77 | bool bMarketDepth = false;
78 | if (request.NoMDEntryTypes > 0)
79 | {
80 | switch (request.GetMDEntryTypesGroup(0).MDEntryType)
81 | {
82 | case FIXMDEntryType.Bid:
83 | case FIXMDEntryType.Offer:
84 | if (request.MarketDepth != 1)
85 | {
86 | bMarketDepth = true;
87 | break;
88 | }
89 | bQuote = true;
90 | break;
91 | case FIXMDEntryType.Trade:
92 | bTrade = true;
93 | break;
94 | }
95 | }
96 | bSubscribe = (request.SubscriptionRequestType == DataManager.MARKET_DATA_SUBSCRIBE);
97 |
98 | if (bSubscribe)
99 | {
100 | for (int i = 0; i < request.NoRelatedSym; ++i)
101 | {
102 | FIXRelatedSymGroup group = request.GetRelatedSymGroup(i);
103 | Instrument inst = InstrumentManager.Instruments[group.Symbol];
104 |
105 | //将用户合约转成交易所合约
106 | string altSymbol = inst.GetSymbol(this.Name);
107 | string altExchange = inst.GetSecurityExchange(this.Name);
108 | string MarketStockCode = altExchange.ToLower() + altSymbol;
109 |
110 | DataRecord record;
111 | if (!_dictAltSymbol2Instrument.TryGetValue(MarketStockCode, out record))
112 | {
113 | record = new DataRecord();
114 | record.Instrument = inst;
115 | record.Symbol = altSymbol;
116 | record.Exchange = altExchange;
117 | _dictAltSymbol2Instrument[MarketStockCode] = record;
118 |
119 | mdlog.Info("订阅合约 {0} {1} {2}", MarketStockCode, record.Symbol, record.Exchange);
120 | }
121 |
122 | if (bTrade)
123 | record.TradeRequested = true;
124 | if (bQuote)
125 | record.QuoteRequested = true;
126 | if (bMarketDepth)
127 | record.MarketDepthRequested = true;
128 |
129 | if (bMarketDepth)
130 | {
131 | inst.OrderBook.Clear();
132 | }
133 | }
134 | }
135 | else
136 | {
137 | for (int i = 0; i < request.NoRelatedSym; ++i)
138 | {
139 | FIXRelatedSymGroup group = request.GetRelatedSymGroup(i);
140 | Instrument inst = InstrumentManager.Instruments[group.Symbol];
141 |
142 | //将用户合约转成交易所合约
143 | string altSymbol = inst.GetSymbol(this.Name);
144 | string altExchange = inst.GetSecurityExchange(this.Name);
145 | string MarketStockCode = altExchange.ToLower() + altSymbol;
146 |
147 | DataRecord record;
148 | if (!_dictAltSymbol2Instrument.TryGetValue(MarketStockCode, out record))
149 | {
150 | break;
151 | }
152 |
153 | if (bTrade)
154 | record.TradeRequested = false;
155 | if (bQuote)
156 | record.QuoteRequested = false;
157 | if (bMarketDepth)
158 | record.MarketDepthRequested = false;
159 |
160 | if (!record.TradeRequested && !record.QuoteRequested && !record.MarketDepthRequested)
161 | {
162 | _dictAltSymbol2Instrument.Remove(MarketStockCode);
163 | mdlog.Info("取消合约 {0} {1} {2}", MarketStockCode, record.Symbol, record.Exchange);
164 | }
165 | }
166 | }
167 | }
168 |
169 | private bool EmitNewMarketDepth(Instrument instrument, DateTime datatime, int position, MDSide ask, double price, int size)
170 | {
171 | bool bRet = false;
172 | MDOperation insert = MDOperation.Update;
173 | if (MDSide.Ask == ask)
174 | {
175 | if (position >= instrument.OrderBook.Ask.Count)
176 | {
177 | insert = MDOperation.Insert;
178 | }
179 | }
180 | else
181 | {
182 | if (position >= instrument.OrderBook.Bid.Count)
183 | {
184 | insert = MDOperation.Insert;
185 | }
186 | }
187 |
188 | if (price != 0 && size != 0)
189 | {
190 | EmitNewMarketDepth(instrument, new MarketDepth(datatime, "", position, insert, ask, price, size));
191 | bRet = true;
192 | }
193 | return bRet;
194 | }
195 |
196 | private void EmitNewMarketDepth(IFIXInstrument instrument, MarketDepth marketDepth)
197 | {
198 | if (NewMarketDepth != null)
199 | {
200 | NewMarketDepth(this, new MarketDepthEventArgs(marketDepth, instrument, this));
201 | }
202 | }
203 | #endregion
204 | }
205 | }
206 |
--------------------------------------------------------------------------------
/src/QuantBox.OQ.TongShi/APIProvider.TongShi.cs:
--------------------------------------------------------------------------------
1 | using NLog;
2 | using NLog.Config;
3 | using SmartQuant;
4 | using SmartQuant.Data;
5 | using SmartQuant.Providers;
6 | using StockDll;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.ComponentModel;
10 | using System.Linq;
11 | using System.Reflection;
12 | using System.Text;
13 | using QuantBox.Helper.TongShi;
14 | using SmartQuant.Instruments;
15 |
16 | namespace QuantBox.OQ.TongShi
17 | {
18 | public partial class APIProvider
19 | {
20 | private IStockService StockService;
21 |
22 | private readonly Dictionary _dictAltSymbol2Instrument = new Dictionary();
23 |
24 | private readonly Dictionary _dictDepthMarketData = new Dictionary();
25 |
26 | ///
27 | /// 初始化股票接口,并注册相关事件。
28 | ///
29 | void InitStockService()
30 | {
31 | StockService = StockServiceFactory.CreateStockService();
32 | //注册登录通知事件
33 | StockService.OnLoginAuth += new EventHandler(StockService_OnLoginAuth);
34 | //注册补5分钟数据事件
35 | StockService.OnRcv5Minute += new EventHandler(StockService_OnRcv5Minute);
36 | //注册收到基本资料事件
37 | StockService.OnRcvBase += new EventHandler(StockService_OnRcvBase);
38 | //注册补历史日线数据事件
39 | StockService.OnRcvHistory += new EventHandler(StockService_OnRcvHistory);
40 | //注册补分钟数据事件
41 | StockService.OnRcvMinute += new EventHandler(StockService_OnRcvMinute);
42 | //注册接收到新闻资料数据事件。
43 | StockService.OnRcvNew += new EventHandler(StockService_OnRcvNew);
44 | //注册接收到除权数据事件
45 | StockService.OnRcvPower += new EventHandler(StockService_OnRcvPower);
46 | //注册接收到行情数据事件
47 | StockService.OnRcvReport += new EventHandler(StockService_OnRcvReport);
48 | //注册接收到财务数据事件
49 | StockService.OnRcvSTKFin += new EventHandler(StockService_OnRcvSTKFin);
50 | //注册接收到证券代码表事件
51 | StockService.OnRcvSTKLabel += new EventHandler(StockService_OnRcvSTKLabel);
52 | //注册接收到分笔数据事件
53 | StockService.OnRcvSTKTick += new EventHandler(StockService_OnRcvSTKTick);
54 | }
55 |
56 | void StockService_OnRcvSTKTick(object sender, RcvSTKTickEventArgs e)
57 | {
58 | //StringBuilder Builder = new StringBuilder();
59 | //Builder.Append(string.Format("消息ID{0},收到分笔数据{1},显示前20行...", e.Msg.ToString(), e.StkTicks.Length.ToString()));
60 | //Builder.Append(System.Environment.NewLine);
61 | //BuildHeader(typeof(StructSTKTICK), Builder);
62 | //for (int i = 0; i < 20 && i < e.StkTicks.Length; i++)
63 | //{
64 | // BuildData(e.StkTicks[i], Builder);
65 | //}
66 |
67 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
68 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
69 |
70 | }
71 |
72 | void StockService_OnRcvSTKLabel(object sender, RcvSTKLabelEventArgs e)
73 | {
74 |
75 | //StringBuilder Builder = new StringBuilder();
76 | //Builder.Append(string.Format("消息ID{0},收到证券代码表{1},显示前20行...", e.Msg.ToString(), e.RcvStkLabels.Length.ToString()));
77 | //Builder.Append(System.Environment.NewLine);
78 | //BuildHeader(typeof(StructSTKLABEL), Builder);
79 | //for (int i = 0; i < 20 && i < e.RcvStkLabels.Length; i++)
80 | //{
81 | // BuildData(e.RcvStkLabels[i], Builder);
82 | //}
83 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
84 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
85 |
86 | }
87 |
88 | void StockService_OnRcvSTKFin(object sender, RcvSTKFinEventArgs e)
89 | {
90 | //StringBuilder Builder = new StringBuilder();
91 | //Builder.Append(string.Format("消息ID{0},收到财务数据{1},显示前20行...", e.Msg.ToString(), e.RcvFins.Length.ToString()));
92 | //Builder.Append(System.Environment.NewLine);
93 | //BuildHeader(typeof(StructSTKFin), Builder);
94 | //for (int i = 0; i < 20 && i < e.RcvFins.Length; i++)
95 | //{
96 | // BuildData(e.RcvFins[i], Builder);
97 | //}
98 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
99 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
100 | }
101 |
102 | private DateTime _dateTime = DateTime.Now;
103 | void StockService_OnRcvReport(object sender, RcvReportEventArgs e)
104 | {
105 | _dateTime = Clock.Now;
106 |
107 | lock (_dictDepthMarketData)
108 | {
109 | for (int i = 0; i < e.RcvReports.Length; ++i)
110 | {
111 | StructRcvReport pDepthMarketData = e.RcvReports[i];
112 |
113 | StructRcvReport DepthMarket;
114 | _dictDepthMarketData.TryGetValue(pDepthMarketData.MarketStockCode, out DepthMarket);
115 |
116 | _dictDepthMarketData[pDepthMarketData.MarketStockCode] = pDepthMarketData;
117 |
118 | DataRecord record;
119 | if (_dictAltSymbol2Instrument.TryGetValue(pDepthMarketData.MarketStockCode, out record))
120 | {
121 | if (record.TradeRequested)
122 | {
123 | if (DepthMarket.NewPrice == pDepthMarketData.NewPrice
124 | && DepthMarket.Volume == pDepthMarketData.Volume)
125 | { }
126 | else
127 | {
128 | float volume = pDepthMarketData.Volume - DepthMarket.Volume;
129 | if (0 == DepthMarket.Volume)
130 | {
131 | //没有接收到最开始的一条,所以这计算每个Bar的数据时肯定超大,强行设置为0
132 | volume = 0;
133 | }
134 | else if (volume < 0)
135 | {
136 | //如果隔夜运行,会出现今早成交量0-昨收盘成交量,出现负数,所以当发现为负时要修改
137 | volume = pDepthMarketData.Volume;
138 | }
139 |
140 |
141 | TongShiTrade trade = new TongShiTrade(_dateTime,
142 | pDepthMarketData.NewPrice,
143 | (int)volume);
144 |
145 | EmitNewTradeEvent(record.Instrument, trade);
146 | }
147 | }
148 |
149 | if (record.QuoteRequested)
150 | {
151 | TongShiQuote quote = new TongShiQuote(_dateTime,
152 | (double)pDepthMarketData.BuyPrice1,
153 | (int)pDepthMarketData.BuyVolume1,
154 | (double)pDepthMarketData.SellPrice1,
155 | (int)pDepthMarketData.SellVolume1
156 | );
157 |
158 | quote.DepthMarketData = pDepthMarketData;
159 |
160 | EmitNewQuoteEvent(record.Instrument, quote);
161 | }
162 |
163 | if (record.MarketDepthRequested)
164 | {
165 | bool bAsk = true;
166 | bool bBid = true;
167 |
168 | if(bAsk)
169 | bAsk = EmitNewMarketDepth(record.Instrument, _dateTime, 0, MDSide.Ask, (double)pDepthMarketData.SellPrice1, (int)pDepthMarketData.SellVolume1);
170 | if(bBid)
171 | bBid = EmitNewMarketDepth(record.Instrument, _dateTime, 0, MDSide.Bid, (double)pDepthMarketData.BuyPrice1, (int)pDepthMarketData.BuyVolume1);
172 |
173 | if (bAsk)
174 | bAsk = EmitNewMarketDepth(record.Instrument, _dateTime, 1, MDSide.Ask, (double)pDepthMarketData.SellPrice2, (int)pDepthMarketData.SellVolume2);
175 | if (bBid)
176 | bBid = EmitNewMarketDepth(record.Instrument, _dateTime, 1, MDSide.Bid, (double)pDepthMarketData.BuyPrice2, (int)pDepthMarketData.BuyVolume2);
177 |
178 | if (bAsk)
179 | bAsk = EmitNewMarketDepth(record.Instrument, _dateTime, 2, MDSide.Ask, (double)pDepthMarketData.SellPrice3, (int)pDepthMarketData.SellVolume3);
180 | if (bBid)
181 | bBid = EmitNewMarketDepth(record.Instrument, _dateTime, 2, MDSide.Bid, (double)pDepthMarketData.BuyPrice3, (int)pDepthMarketData.BuyVolume3);
182 |
183 | if (bAsk)
184 | bAsk = EmitNewMarketDepth(record.Instrument, _dateTime, 3, MDSide.Ask, (double)pDepthMarketData.SellPrice4, (int)pDepthMarketData.SellVolume4);
185 | if (bBid)
186 | bBid = EmitNewMarketDepth(record.Instrument, _dateTime, 3, MDSide.Bid, (double)pDepthMarketData.BuyPrice4, (int)pDepthMarketData.BuyVolume4);
187 |
188 | if (bAsk)
189 | bAsk = EmitNewMarketDepth(record.Instrument, _dateTime, 4, MDSide.Ask, (double)pDepthMarketData.SellPrice5, (int)pDepthMarketData.SellVolume5);
190 | if (bBid)
191 | bBid = EmitNewMarketDepth(record.Instrument, _dateTime, 4, MDSide.Bid, (double)pDepthMarketData.BuyPrice5, (int)pDepthMarketData.BuyVolume5);
192 | }
193 | }
194 | }
195 | }
196 | }
197 |
198 | void StockService_OnRcvPower(object sender, RcvPowerEventArgs e)
199 | {
200 | //StringBuilder Builder = new StringBuilder();
201 | //Builder.Append(string.Format("消息ID{0},收到除权数据{1},显示前20行...", e.Msg.ToString(), e.RcvPowers.Length.ToString()));
202 | //Builder.Append(System.Environment.NewLine);
203 | //BuildHeader(typeof(StructRcvPower), Builder);
204 | //for (int i = 0; i < 20 && i < e.RcvPowers.Length; i++)
205 | //{
206 | // BuildData(e.RcvPowers[i], Builder);
207 | //}
208 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
209 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
210 | }
211 |
212 | void StockService_OnRcvNew(object sender, RcvNewEventArgs e)
213 | {
214 | //StringBuilder Builder = new StringBuilder();
215 | //Builder.AppendFormat("消息ID{0},收到新闻资料:", e.Msg);
216 | //Builder.Append(e.FileHead.FileName);
217 | //Builder.Append(System.Environment.NewLine);
218 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
219 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
220 | }
221 |
222 | void StockService_OnRcvMinute(object sender, RcvMinuteEventArgs e)
223 | {
224 | //StringBuilder Builder = new StringBuilder();
225 | //Builder.Append(string.Format("消息ID{0},收到1分钟数据{1},显示前20行...", e.Msg.ToString(), e.RcvMinutes.Length.ToString()));
226 | //Builder.Append(System.Environment.NewLine);
227 | //BuildHeader(typeof(StructRcvMinute), Builder);
228 | //for (int i = 0; i < 20 && i < e.RcvMinutes.Length; i++)
229 | //{
230 | // BuildData(e.RcvMinutes[i], Builder);
231 | //}
232 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
233 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
234 |
235 | }
236 |
237 | void StockService_OnRcvHistory(object sender, RcvHistoryEventArgs e)
238 | {
239 | //StringBuilder Builder = new StringBuilder();
240 | //Builder.Append(string.Format("消息ID{0},收到历史日线数据{1},显示前20行...", e.Msg.ToString(), e.RcvHistorys.Length.ToString()));
241 | //Builder.Append(System.Environment.NewLine);
242 | //BuildHeader(typeof(StructRcvHistory), Builder);
243 | //for (int i = 0; i < 20 && i < e.RcvHistorys.Length; i++)
244 | //{
245 | // BuildData(e.RcvHistorys[i], Builder);
246 | //}
247 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
248 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
249 | }
250 |
251 | void StockService_OnRcvBase(object sender, RcvBaseEventArgs e)
252 | {
253 | //StringBuilder Builder = new StringBuilder();
254 | //Builder.AppendFormat("消息ID{0},收到基本资料:", e.Msg);
255 | //Builder.Append(e.FileHead.FileName);
256 | //Builder.Append(System.Environment.NewLine);
257 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
258 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
259 | }
260 |
261 | void StockService_OnRcv5Minute(object sender, Rcv5MinuteEventArgs e)
262 | {
263 | //StringBuilder Builder = new StringBuilder();
264 | //Builder.Append(string.Format("消息ID{0},收到5分钟数据{1},显示前20行...", e.Msg.ToString(), e.RcvHistorys.Length.ToString()));
265 | //Builder.Append(System.Environment.NewLine);
266 | //BuildHeader(typeof(StructRcvHistory), Builder);
267 | //for (int i = 0; i < 20 && i < e.RcvHistorys.Length; i++)
268 | //{
269 | // BuildData(e.RcvHistorys[i], Builder);
270 | //}
271 | ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。
272 | //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString());
273 | }
274 |
275 | void StockService_OnLoginAuth(object sender, LoginAuthEventArgs e)
276 | {
277 | StringBuilder Builder = new StringBuilder();
278 | if (e.StkLoginAuth.bAuthorizationState == 1)
279 | {
280 | mdlog.Info("登录成功!");
281 | }
282 | else
283 | {
284 | mdlog.Error("登录失败!");
285 | }
286 | }
287 |
288 | }
289 | }
290 |
--------------------------------------------------------------------------------
/lib/dll/StockDll.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | StockDll
5 |
6 |
7 |
8 |
9 | 拼音转换类
10 |
11 |
12 |
13 |
14 | 获得一个字符串的汉语拼音码
15 |
16 | 字符串
17 | 汉语拼音码,该字符串只包含大写的英文字母
18 |
19 |
20 |
21 | 接口事件数据基类(提供消息ID,和驱动路径扩展)
22 |
23 |
24 |
25 |
26 | 消息ID
27 |
28 |
29 |
30 |
31 | 驱动路径
32 |
33 |
34 |
35 |
36 | 时间转换类。
37 |
38 |
39 |
40 |
41 | Private constructor to prevent the class from being instantiated.
42 |
43 |
44 |
45 |
46 | time_t is an int representing the number of seconds since Midnight UTC 1 Jan 1970 on the Gregorian Calendar.
47 |
48 |
49 |
50 |
51 |
52 |
53 | time_t is an int representing the number of seconds since Midnight UTC 1 Jan 1970 on the Gregorian Calendar.
54 |
55 |
56 |
57 |
58 |
59 |
60 | 补历史K线数据结构体
61 |
62 |
63 |
64 |
65 | 时间
66 |
67 |
68 | (time_t格式)
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 |
110 |
111 | 跌数
112 |
113 |
114 | 仅大盘有效
115 |
116 |
117 |
118 |
119 | 数据长度
120 |
121 |
122 | 仅当IsTag为真时有效
123 |
124 |
125 |
126 |
127 | 数据头标示
128 |
129 |
130 |
131 |
132 | 证券市场
133 |
134 |
135 | 仅当IsTag为真时有效
136 |
137 |
138 |
139 |
140 | 市场类型
141 |
142 |
143 | SH,SZ仅当IsTag为真时有效
144 |
145 |
146 |
147 |
148 | 股票代码
149 |
150 |
151 | 仅当IsTag为真时有效
152 |
153 |
154 |
155 |
156 | 股票代码
157 |
158 |
159 | 包含市场类型
160 |
161 |
162 |
163 |
164 | 是否数据包头
165 |
166 |
167 |
168 |
169 | 时间
170 |
171 |
172 | DateTime格式
173 |
174 |
175 |
176 |
177 | 数据头结构定义
178 |
179 |
180 |
181 |
182 | 数据包头
183 |
184 |
185 |
186 |
187 | 证券市场
188 |
189 |
190 |
191 |
192 | 证券代码
193 |
194 |
195 |
196 |
197 | 市场类型(SH,SZ)
198 |
199 |
200 |
201 |
202 | 股票代码
203 |
204 |
205 |
206 |
207 | 补分钟数据结构体
208 |
209 |
210 |
211 |
212 | 时间
213 |
214 |
215 | time_t格式
216 |
217 |
218 |
219 |
220 | 价格
221 |
222 |
223 |
224 |
225 | 成交量
226 |
227 |
228 |
229 |
230 | 成交额
231 |
232 |
233 |
234 |
235 | 数据长度
236 |
237 |
238 | 仅当IsTag为真时有效
239 |
240 |
241 |
242 |
243 | 数据头标示
244 |
245 |
246 |
247 |
248 | 证券市场
249 |
250 |
251 | 仅当IsTag为真时有效
252 |
253 |
254 |
255 |
256 | 市场类型
257 |
258 |
259 | SH,SZ仅当IsTag为真时有效
260 |
261 |
262 |
263 |
264 | 股票代码
265 |
266 |
267 | 仅当IsTag为真时有效
268 |
269 |
270 |
271 |
272 | 股票代码
273 |
274 |
275 | 包含市场类型
276 |
277 |
278 |
279 |
280 | 时间
281 |
282 |
283 | DateTime格式
284 |
285 |
286 |
287 |
288 | 是否数据包头
289 |
290 |
291 |
292 |
293 | 补除权数据结构体
294 |
295 |
296 |
297 |
298 | 时间
299 |
300 |
301 | time_t格式
302 |
303 |
304 |
305 |
306 | 每股送
307 |
308 |
309 |
310 |
311 | 每股配
312 |
313 |
314 |
315 |
316 | 配股价
317 |
318 |
319 | 仅当 m_fPei != 0.0f 时有效
320 |
321 |
322 |
323 |
324 | 每股红利
325 |
326 |
327 |
328 |
329 | 数据长度
330 |
331 |
332 | 仅当IsTag为真时有效
333 |
334 |
335 |
336 |
337 | 数据头标示
338 |
339 |
340 |
341 |
342 | 证券市场
343 |
344 |
345 | 仅当IsTag为真时有效
346 |
347 |
348 |
349 |
350 | 市场类型
351 |
352 |
353 | SH,SZ 仅当IsTag为真时有效
354 |
355 |
356 |
357 |
358 | 获取股票代码
359 |
360 |
361 | 仅当IsTag为真时有效
362 |
363 |
364 |
365 |
366 | 股票代码
367 |
368 |
369 | 包含市场类型
370 |
371 |
372 |
373 |
374 | 是否数据包头
375 |
376 |
377 |
378 |
379 | 时间
380 |
381 |
382 | DateTime格式
383 |
384 |
385 |
386 |
387 | 文件头结构体定义
388 |
389 |
390 |
391 |
392 | 文件子类型
393 |
394 |
395 |
396 |
397 | 文件长度
398 |
399 |
400 |
401 |
402 | 序列号
403 |
404 |
405 |
406 |
407 | 文件名 or URL
408 |
409 |
410 |
411 |
412 | 银江财务数据结构体
413 |
414 |
415 |
416 |
417 | 市场类型
418 |
419 |
420 |
421 |
422 | 保留字段
423 |
424 |
425 |
426 |
427 | 股票代码
428 |
429 |
430 |
431 |
432 | 财务数据的日期
433 |
434 |
435 | 如半年报 季报等 如 20090630 表示 2009年半年报
436 |
437 |
438 |
439 |
440 | 总股本
441 |
442 |
443 |
444 |
445 | 国家股
446 |
447 |
448 |
449 |
450 | 发起人法人股
451 |
452 |
453 |
454 |
455 | 法人股
456 |
457 |
458 |
459 |
460 | B股
461 |
462 |
463 |
464 |
465 | H股
466 |
467 |
468 |
469 |
470 | 目前流通
471 |
472 |
473 |
474 |
475 | 职工股
476 |
477 |
478 |
479 |
480 | A2转配股
481 |
482 |
483 |
484 |
485 | 总资产(千元)
486 |
487 |
488 |
489 |
490 | 流动资产
491 |
492 |
493 |
494 |
495 | 固定资产
496 |
497 |
498 |
499 |
500 | 无形资产
501 |
502 |
503 |
504 |
505 | 长期投资
506 |
507 |
508 |
509 |
510 | 流动负债
511 |
512 |
513 |
514 |
515 | 长期负债
516 |
517 |
518 |
519 |
520 | 资本公积金
521 |
522 |
523 |
524 |
525 | 每股公积金
526 |
527 |
528 |
529 |
530 | 股东权益
531 |
532 |
533 |
534 |
535 | 主营收入
536 |
537 |
538 |
539 |
540 | 主营利润
541 |
542 |
543 |
544 |
545 | 其他利润
546 |
547 |
548 |
549 |
550 | 营业利润
551 |
552 |
553 |
554 |
555 | 投资收益
556 |
557 |
558 |
559 |
560 | 补贴收入
561 |
562 |
563 |
564 |
565 | 营业外收支
566 |
567 |
568 |
569 |
570 | 上年损益调整
571 |
572 |
573 |
574 |
575 | 利润总额
576 |
577 |
578 |
579 |
580 | 税后利润
581 |
582 |
583 |
584 |
585 | 净利润
586 |
587 |
588 |
589 |
590 | 未分配利润
591 |
592 |
593 |
594 |
595 | 每股未分配
596 |
597 |
598 |
599 |
600 | 每股收益
601 |
602 |
603 |
604 |
605 | 每股净资产
606 |
607 |
608 |
609 |
610 | 调整每股净资产
611 |
612 |
613 |
614 |
615 | 股东权益比
616 |
617 |
618 |
619 |
620 | 净资产收益率
621 |
622 |
623 |
624 |
625 | 股票代码
626 |
627 |
628 |
629 |
630 | 市场类型
631 |
632 |
633 | SH,SZ
634 |
635 |
636 |
637 |
638 | 红茶财务数据结构体
639 |
640 |
641 |
642 |
643 | 更新时间
644 |
645 |
646 |
647 |
648 | 总股本
649 |
650 |
651 |
652 |
653 | 国家股
654 |
655 |
656 |
657 |
658 | 发起法人股
659 |
660 |
661 |
662 |
663 | 法人股
664 |
665 |
666 |
667 |
668 | B股
669 |
670 |
671 |
672 |
673 | H股
674 |
675 |
676 |
677 |
678 | 流通A股
679 |
680 |
681 |
682 |
683 | 职工股
684 |
685 |
686 |
687 |
688 | A2转配股
689 |
690 |
691 |
692 |
693 | 总资产(千元)
694 |
695 |
696 |
697 |
698 | 流动资产
699 |
700 |
701 |
702 |
703 | 固定资产
704 |
705 |
706 |
707 |
708 | 无形资产
709 |
710 |
711 |
712 |
713 | 长期资产
714 |
715 |
716 |
717 |
718 | 流动负债
719 |
720 |
721 |
722 |
723 | 长期负债
724 |
725 |
726 |
727 |
728 | 资本公积金
729 |
730 |
731 |
732 |
733 | 每股公积金
734 |
735 |
736 |
737 |
738 | 股东权益
739 |
740 |
741 |
742 |
743 | 主营收入
744 |
745 |
746 |
747 |
748 | 主营利润
749 |
750 |
751 |
752 |
753 | 其他利润
754 |
755 |
756 |
757 |
758 | 营业利润
759 |
760 |
761 |
762 |
763 | 投资收益
764 |
765 |
766 |
767 |
768 | 补贴收入
769 |
770 |
771 |
772 |
773 | 营业外收支
774 |
775 |
776 |
777 |
778 | 损益调整
779 |
780 |
781 |
782 |
783 | 利润总额
784 |
785 |
786 |
787 |
788 | 应收帐款周转率
789 |
790 |
791 |
792 |
793 | 净利润
794 |
795 |
796 |
797 |
798 | 未分配利润
799 |
800 |
801 |
802 |
803 | 每股未分配
804 |
805 |
806 |
807 |
808 | 每股收益
809 |
810 |
811 |
812 |
813 | 每股净资产
814 |
815 |
816 |
817 |
818 | 调整每股净资
819 |
820 |
821 |
822 |
823 | 股东权益比率
824 |
825 |
826 |
827 |
828 | 净资收益率
829 |
830 |
831 |
832 |
833 | 经营现金流出
834 |
835 |
836 |
837 |
838 | 经营现金流入
839 |
840 |
841 |
842 |
843 | 经营现金流量
844 |
845 |
846 |
847 |
848 | 投资现金流入
849 |
850 |
851 |
852 |
853 | 投资现金流出
854 |
855 |
856 |
857 |
858 | 投资现金流量
859 |
860 |
861 |
862 |
863 | 筹资现金流入
864 |
865 |
866 |
867 |
868 | 筹资现金流出
869 |
870 |
871 |
872 |
873 | 筹资现金流量
874 |
875 |
876 |
877 |
878 | 现金及等价物
879 |
880 |
881 |
882 |
883 | 应收帐周转率
884 |
885 |
886 |
887 |
888 | 存货周转率
889 |
890 |
891 |
892 |
893 | 股东总数
894 |
895 |
896 |
897 |
898 | 发行价
899 |
900 |
901 |
902 |
903 | 发行量
904 |
905 |
906 |
907 |
908 | 主营业务增长率
909 |
910 |
911 |
912 |
913 | 税后利润增长率
914 |
915 |
916 |
917 |
918 | 净资产增长率
919 |
920 |
921 |
922 |
923 | 总资产增长率
924 |
925 |
926 |
927 |
928 | 数据长度
929 |
930 |
931 | 仅当IsTag为真时有效
932 |
933 |
934 |
935 |
936 | 数据头标示
937 |
938 |
939 |
940 |
941 | 证券市场
942 |
943 |
944 | 仅当IsTag为真时有效
945 |
946 |
947 |
948 |
949 | 市场类型
950 |
951 |
952 | SH,SZ仅当IsTag为真时有效
953 |
954 |
955 |
956 |
957 | 股票代码
958 |
959 |
960 | 仅当IsTag为真时有效
961 |
962 |
963 |
964 |
965 | 股票代码
966 |
967 |
968 | 包含市场类型
969 |
970 |
971 |
972 |
973 | 是否数据包头
974 |
975 |
976 |
977 |
978 | 红茶接口数据包头
979 |
980 |
981 |
982 |
983 | 数据包头
984 |
985 |
986 |
987 |
988 | 标识(暂未使用)
989 |
990 |
991 |
992 |
993 | 证券市场
994 |
995 |
996 |
997 |
998 | 代码
999 |
1000 |
1001 |
1002 |
1003 | 实时行情数据
1004 |
1005 |
1006 |
1007 |
1008 | 结构大小
1009 |
1010 |
1011 |
1012 |
1013 | 成交时间
1014 |
1015 |
1016 | time_t格式
1017 |
1018 |
1019 |
1020 |
1021 | 股票市场类型
1022 |
1023 |
1024 |
1025 |
1026 | 股票代码及名称
1027 |
1028 |
1029 |
1030 |
1031 | 昨收
1032 |
1033 |
1034 |
1035 |
1036 | 开盘价
1037 |
1038 |
1039 |
1040 |
1041 | 最高价
1042 |
1043 |
1044 |
1045 |
1046 | 最低价
1047 |
1048 |
1049 |
1050 |
1051 | 最新价
1052 |
1053 |
1054 |
1055 |
1056 | 成交量
1057 |
1058 |
1059 |
1060 |
1061 | 成交额
1062 |
1063 |
1064 |
1065 |
1066 | 申买价1
1067 |
1068 |
1069 |
1070 |
1071 | 申买价2
1072 |
1073 |
1074 |
1075 |
1076 | 申买价3
1077 |
1078 |
1079 |
1080 |
1081 | 申买量1
1082 |
1083 |
1084 |
1085 |
1086 | 申买量2
1087 |
1088 |
1089 |
1090 |
1091 | 申买量3
1092 |
1093 |
1094 |
1095 |
1096 | 申卖价1
1097 |
1098 |
1099 |
1100 |
1101 | 申卖价2
1102 |
1103 |
1104 |
1105 |
1106 | 申卖价3
1107 |
1108 |
1109 |
1110 |
1111 | 申卖量1
1112 |
1113 |
1114 |
1115 |
1116 | 申卖量2
1117 |
1118 |
1119 |
1120 |
1121 | 申卖量3
1122 |
1123 |
1124 |
1125 |
1126 | 申买价4
1127 |
1128 |
1129 |
1130 |
1131 | 申买量4
1132 |
1133 |
1134 |
1135 |
1136 | 申卖价4
1137 |
1138 |
1139 |
1140 |
1141 | 申卖量4
1142 |
1143 |
1144 |
1145 |
1146 | 申买价5
1147 |
1148 |
1149 |
1150 |
1151 | 申买量5
1152 |
1153 |
1154 |
1155 |
1156 | 申卖价5
1157 |
1158 |
1159 |
1160 |
1161 | 申卖量5
1162 |
1163 |
1164 |
1165 |
1166 | 市场类型
1167 |
1168 |
1169 | SH,SZ
1170 |
1171 |
1172 |
1173 |
1174 | 股票代码
1175 |
1176 |
1177 |
1178 |
1179 | 股票代码
1180 |
1181 |
1182 | 包含市场类型
1183 |
1184 |
1185 |
1186 |
1187 | 股票名称
1188 |
1189 |
1190 |
1191 |
1192 | 名称拼音
1193 |
1194 |
1195 |
1196 |
1197 | 股票类型
1198 |
1199 |
1200 |
1201 |
1202 | 时间
1203 |
1204 |
1205 | DateTime格式
1206 |
1207 |
1208 |
1209 |
1210 | 涨跌
1211 |
1212 |
1213 |
1214 |
1215 | 振幅
1216 |
1217 |
1218 |
1219 |
1220 | 涨跌幅
1221 |
1222 |
1223 |
1224 |
1225 | 是否停牌
1226 |
1227 |
1228 |
1229 |
1230 | 是否ST股
1231 |
1232 |
1233 |
1234 |
1235 | 是否涨停
1236 |
1237 |
1238 |
1239 |
1240 | 涨停价
1241 |
1242 |
1243 |
1244 |
1245 | 跌停价
1246 |
1247 |
1248 |
1249 |
1250 | 是否跌停
1251 |
1252 |
1253 |
1254 |
1255 | 是否创业板
1256 |
1257 |
1258 |
1259 |
1260 | 股票类型(基金,债券,指数等)
1261 |
1262 |
1263 |
1264 |
1265 | 上证A股
1266 |
1267 |
1268 |
1269 |
1270 | 深证A股
1271 |
1272 |
1273 |
1274 |
1275 | 上证B股
1276 |
1277 |
1278 |
1279 |
1280 | 深证B股
1281 |
1282 |
1283 |
1284 |
1285 | 上证债券
1286 |
1287 |
1288 |
1289 |
1290 | 上证转债
1291 |
1292 |
1293 |
1294 |
1295 | 深证债券
1296 |
1297 |
1298 |
1299 |
1300 | 深证转债
1301 |
1302 |
1303 |
1304 |
1305 | 上证基金
1306 |
1307 |
1308 |
1309 |
1310 | 深证基金
1311 |
1312 |
1313 |
1314 |
1315 | 开放基金
1316 |
1317 |
1318 |
1319 |
1320 | 沪深权证
1321 |
1322 |
1323 |
1324 |
1325 | 上证指数
1326 |
1327 |
1328 |
1329 |
1330 | 深证指数
1331 |
1332 |
1333 |
1334 |
1335 | EIF基金
1336 |
1337 |
1338 |
1339 |
1340 | 三板
1341 |
1342 |
1343 |
1344 |
1345 | 未定义
1346 |
1347 |
1348 |
1349 |
1350 | 数据通知消息
1351 |
1352 |
1353 |
1354 |
1355 | 文件类型
1356 |
1357 |
1358 |
1359 |
1360 | 记录数
1361 |
1362 |
1363 |
1364 |
1365 | 文件接口
1366 |
1367 |
1368 |
1369 |
1370 |
1371 |
1372 |
1373 |
1374 |
1375 | 数据指针
1376 |
1377 |
1378 |
1379 |
1380 | 银江分笔结构体定义
1381 |
1382 |
1383 |
1384 |
1385 | 时间
1386 |
1387 |
1388 |
1389 |
1390 | 最高
1391 |
1392 |
1393 |
1394 |
1395 | 最低
1396 |
1397 |
1398 |
1399 |
1400 | 最新
1401 |
1402 |
1403 |
1404 |
1405 | 成交量
1406 |
1407 |
1408 |
1409 |
1410 | 成交额
1411 |
1412 |
1413 |
1414 |
1415 | 保留字段
1416 |
1417 |
1418 |
1419 |
1420 | 申买价1
1421 |
1422 |
1423 |
1424 |
1425 | 申买价2
1426 |
1427 |
1428 |
1429 |
1430 | 申买价3
1431 |
1432 |
1433 |
1434 |
1435 | 申买价4
1436 |
1437 |
1438 |
1439 |
1440 | 申买价5
1441 |
1442 |
1443 |
1444 |
1445 | 申买量1
1446 |
1447 |
1448 |
1449 |
1450 | 申买量2
1451 |
1452 |
1453 |
1454 |
1455 | 申买量3
1456 |
1457 |
1458 |
1459 |
1460 | 申买量4
1461 |
1462 |
1463 |
1464 |
1465 | 申买量5
1466 |
1467 |
1468 |
1469 |
1470 | 申卖价1
1471 |
1472 |
1473 |
1474 |
1475 | 申卖价2
1476 |
1477 |
1478 |
1479 |
1480 | 申卖价3
1481 |
1482 |
1483 |
1484 |
1485 | 申卖价4
1486 |
1487 |
1488 |
1489 |
1490 | 申卖价5
1491 |
1492 |
1493 |
1494 |
1495 | 申卖量1
1496 |
1497 |
1498 |
1499 |
1500 | 申卖量2
1501 |
1502 |
1503 |
1504 |
1505 | 申卖量3
1506 |
1507 |
1508 |
1509 |
1510 | 申卖量4
1511 |
1512 |
1513 |
1514 |
1515 | 申卖量5
1516 |
1517 |
1518 |
1519 |
1520 | 红茶接口登录返回信息
1521 |
1522 |
1523 |
1524 |
1525 | 登录状态
1526 |
1527 |
1528 | 成功返回1,失败返回0
1529 |
1530 |
1531 |
1532 |
1533 | 证券代码表结构体定义
1534 |
1535 |
1536 |
1537 |
1538 | 证券市场
1539 |
1540 |
1541 |
1542 |
1543 | 股票代码名称
1544 |
1545 |
1546 |
1547 |
1548 | 拼音
1549 |
1550 |
1551 |
1552 |
1553 | 昨收
1554 |
1555 |
1556 |
1557 |
1558 | 时间
1559 |
1560 |
1561 | time_t格式
1562 |
1563 |
1564 |
1565 |
1566 | 市场类型
1567 |
1568 |
1569 | SH,SZ
1570 |
1571 |
1572 |
1573 |
1574 | 时间
1575 |
1576 |
1577 | DateTime格式
1578 |
1579 |
1580 |
1581 |
1582 | 股票代码
1583 |
1584 |
1585 |
1586 |
1587 | 股票代码
1588 |
1589 |
1590 | 包含市场类型
1591 |
1592 |
1593 |
1594 |
1595 | 股票名称
1596 |
1597 |
1598 |
1599 |
1600 | 红茶接口数据结构体定义
1601 |
1602 |
1603 |
1604 |
1605 | 文件类型
1606 |
1607 |
1608 |
1609 |
1610 | 记录数
1611 |
1612 |
1613 |
1614 |
1615 | 数据指针
1616 |
1617 |
1618 |
1619 |
1620 | 红茶分笔结构体定义
1621 |
1622 |
1623 |
1624 |
1625 | 时间
1626 |
1627 |
1628 | time_t格式
1629 |
1630 |
1631 |
1632 |
1633 | 最新价
1634 |
1635 |
1636 |
1637 |
1638 | 成交量
1639 |
1640 |
1641 |
1642 |
1643 | 成交金额
1644 |
1645 |
1646 |
1647 |
1648 | 价格
1649 |
1650 |
1651 |
1652 |
1653 | 数据长度
1654 |
1655 |
1656 | 仅当IsTag为真时有效
1657 |
1658 |
1659 |
1660 |
1661 | 数据头标示
1662 |
1663 |
1664 |
1665 |
1666 | 证券市场
1667 |
1668 |
1669 | 仅当IsTag为真时有效
1670 |
1671 |
1672 |
1673 |
1674 | 时间
1675 |
1676 |
1677 | DateTime格式
1678 |
1679 |
1680 |
1681 |
1682 | 市场类型
1683 |
1684 |
1685 | SH,SZ,仅当IsTag为真时有效
1686 |
1687 |
1688 |
1689 |
1690 | 获取股票代码
1691 |
1692 |
1693 | 仅当IsTag为真时有效
1694 |
1695 |
1696 |
1697 |
1698 | 股票代码
1699 |
1700 |
1701 | 包含市场类型
1702 |
1703 |
1704 |
1705 |
1706 | 是否数据包头
1707 |
1708 |
1709 |
1710 |
1711 | 红茶接口消息类型定义
1712 |
1713 |
1714 |
1715 |
1716 | 红茶接口双向数据请求类型
1717 |
1718 |
1719 |
1720 |
1721 | 分笔数据
1722 |
1723 |
1724 |
1725 |
1726 | 1分钟数据
1727 |
1728 |
1729 |
1730 |
1731 | 5分钟数据
1732 |
1733 |
1734 |
1735 |
1736 | 日线数据
1737 |
1738 |
1739 |
1740 |
1741 | 接口数据服务类
1742 |
1743 |
1744 |
1745 |
1746 | 初始化接口
1747 |
1748 |
1749 |
1750 |
1751 | 初始化接口
1752 |
1753 | 调用的DLL路径
1754 | 消息ID
1755 |
1756 |
1757 |
1758 | 根据Fin文件路径,获取财务数据
1759 |
1760 | Fin文件路径
1761 | 银江财务数据结构体
1762 |
1763 |
1764 |
1765 | 关闭所有接口
1766 |
1767 |
1768 |
1769 |
1770 | 关闭消息对应的接口
1771 |
1772 | 消息ID
1773 |
1774 |
1775 |
1776 | 红茶接口请求数据
1777 |
1778 | 市场类型(HS,SZ)
1779 | 证券代码
1780 | 请求数据类型
1781 |
1782 |
1783 |
1784 |
1785 | 收到5分钟数据
1786 |
1787 |
1788 |
1789 |
1790 | 收到基础资料
1791 |
1792 |
1793 |
1794 |
1795 | 收到历史K线数据
1796 |
1797 |
1798 |
1799 |
1800 | 收到一分钟数据
1801 |
1802 |
1803 |
1804 |
1805 | 收到新闻
1806 |
1807 |
1808 |
1809 |
1810 | 收到除权数据
1811 |
1812 |
1813 |
1814 |
1815 | 收到行情数据
1816 |
1817 |
1818 |
1819 |
1820 | 收到红茶财务数据
1821 |
1822 |
1823 |
1824 |
1825 | 收到红茶分笔数据
1826 |
1827 |
1828 |
1829 |
1830 | 收到红茶接口登录信息
1831 |
1832 |
1833 |
1834 |
1835 | 收到红茶接口证券代码表
1836 |
1837 |
1838 |
1839 |
1840 | 接口消息数据处理包装类
1841 |
1842 |
1843 |
1844 |
1845 | 必需的设计器变量。
1846 |
1847 |
1848 |
1849 |
1850 | 清理所有正在使用的资源。
1851 |
1852 | 如果应释放托管资源,为 true;否则为 false。
1853 |
1854 |
1855 |
1856 | 设计器支持所需的方法 - 不要
1857 | 使用代码编辑器修改此方法的内容。
1858 |
1859 |
1860 |
1861 |
1862 | 根据传入的文件路径,获取财务数据,适用银江。
1863 |
1864 |
1865 |
1866 |
1867 |
1868 |
1869 | 红茶接口扩展消息类型
1870 |
1871 |
1872 |
1873 |
1874 | 通视消息类型
1875 |
1876 |
1877 |
1878 |
1879 | 通视文件类型(新闻,基础资料,补日线,补分钟等)
1880 |
1881 |
1882 |
1883 |
1884 | 构造函数
1885 |
1886 |
1887 |
1888 |
1889 | 初始化接口
1890 |
1891 |
1892 |
1893 |
1894 | 初始化接口
1895 |
1896 | 接口路径
1897 | 消息ID
1898 |
1899 |
1900 |
1901 | 消息处理函数
1902 |
1903 |
1904 |
1905 |
1906 |
1907 | 处理通视规范数据
1908 |
1909 |
1910 |
1911 |
1912 | 处理接收行情
1913 |
1914 |
1915 |
1916 |
1917 |
1918 |
1919 | 处理接收文件(历史K线,分钟,5分钟,除权,新闻等)
1920 |
1921 |
1922 |
1923 |
1924 |
1925 |
1926 | 处理银江补分笔
1927 |
1928 |
1929 |
1930 |
1931 |
1932 |
1933 | 处理接收基本资料
1934 |
1935 |
1936 |
1937 |
1938 |
1939 |
1940 |
1941 | 处理接收新闻数据
1942 |
1943 |
1944 |
1945 |
1946 |
1947 |
1948 |
1949 | 处理财务信息(红茶接口改动后,已不调用)
1950 |
1951 |
1952 |
1953 |
1954 |
1955 |
1956 |
1957 | 处理补除权数据
1958 |
1959 |
1960 |
1961 |
1962 |
1963 |
1964 |
1965 | 处理补分钟数据
1966 |
1967 |
1968 |
1969 |
1970 |
1971 |
1972 |
1973 | 处理补历史K线数据
1974 |
1975 |
1976 |
1977 |
1978 |
1979 |
1980 |
1981 | 处理补5分钟数据
1982 |
1983 |
1984 |
1985 |
1986 |
1987 |
1988 |
1989 | 处理红茶接口扩充数据
1990 |
1991 |
1992 |
1993 |
1994 | 处理登录信息
1995 |
1996 |
1997 |
1998 |
1999 |
2000 |
2001 | 处理红茶代码表数据
2002 |
2003 |
2004 |
2005 |
2006 |
2007 |
2008 | 处理红茶实时行情数据
2009 |
2010 |
2011 |
2012 |
2013 |
2014 |
2015 | 处理红茶补5分钟数据
2016 |
2017 |
2018 |
2019 |
2020 |
2021 |
2022 | 处理红茶补1分钟数据
2023 |
2024 |
2025 |
2026 |
2027 |
2028 |
2029 | 处理红茶除权数据
2030 |
2031 |
2032 |
2033 |
2034 |
2035 |
2036 | 处理红茶补历史K线数据
2037 |
2038 |
2039 |
2040 |
2041 |
2042 |
2043 | 处理红茶分笔数据
2044 |
2045 |
2046 |
2047 |
2048 |
2049 |
2050 | 处理红茶补财务数据
2051 |
2052 |
2053 |
2054 |
2055 |
2056 |
2057 | 双向请求数据接口
2058 |
2059 | 市场类型,HS,SZ
2060 | 请求股票代码
2061 | 请求数据类型
2062 |
2063 |
2064 |
2065 |
2066 | 双向请求数据接口
2067 |
2068 | 消息ID
2069 | 市场类型
2070 | 请求股票代码
2071 | 请求数据类型
2072 |
2073 |
2074 |
2075 |
2076 | 关闭接口
2077 |
2078 |
2079 |
2080 |
2081 | 关闭Msg相对应的接口
2082 |
2083 |
2084 |
2085 |
2086 | 收到实时行情
2087 |
2088 |
2089 |
2090 |
2091 | 收到分钟数据
2092 |
2093 |
2094 |
2095 |
2096 | 收到除权数据
2097 |
2098 |
2099 |
2100 |
2101 | 收到历史日线数据
2102 |
2103 |
2104 |
2105 |
2106 | 补5分钟数据
2107 |
2108 |
2109 |
2110 |
2111 | 收到基本资料
2112 |
2113 |
2114 |
2115 |
2116 | 收到新闻资料
2117 |
2118 |
2119 |
2120 |
2121 | 收到红茶飞狐财务数据
2122 |
2123 |
2124 |
2125 |
2126 | 收到红茶补分笔数据
2127 |
2128 |
2129 |
2130 |
2131 | 红茶接口登录事件
2132 |
2133 |
2134 |
2135 |
2136 | 收到红茶接口代码表
2137 |
2138 |
2139 |
2140 |
2141 | 初始化数据接口委托
2142 |
2143 |
2144 |
2145 |
2146 |
2147 |
2148 |
2149 |
2150 | 请求数据委托
2151 |
2152 |
2153 |
2154 |
2155 |
2156 |
2157 |
2158 |
2159 | 关闭数据接口委托
2160 |
2161 |
2162 |
2163 |
2164 |
2165 |
2166 | 实时行情事件数据类
2167 |
2168 |
2169 |
2170 |
2171 | 行情数据
2172 |
2173 |
2174 |
2175 |
2176 | 补历史K线事件数据类。
2177 |
2178 |
2179 |
2180 |
2181 | 获取或设置历史K线数据
2182 |
2183 |
2184 |
2185 |
2186 | 补1分钟事件数据类
2187 |
2188 |
2189 |
2190 |
2191 | 一分钟数据
2192 |
2193 |
2194 |
2195 |
2196 | 补5分钟事件数据类
2197 |
2198 |
2199 |
2200 |
2201 | 5分钟数据
2202 |
2203 |
2204 |
2205 |
2206 | 补除权事件数据类
2207 |
2208 |
2209 |
2210 |
2211 | 除权数据
2212 |
2213 |
2214 |
2215 |
2216 | 补红茶分笔事件数据类
2217 |
2218 |
2219 |
2220 |
2221 | 分笔数据
2222 |
2223 |
2224 |
2225 |
2226 | 补红茶财务事件数据类
2227 |
2228 |
2229 |
2230 |
2231 | 财务数据
2232 |
2233 |
2234 |
2235 |
2236 | 收到基本资料数据事件类
2237 |
2238 |
2239 |
2240 |
2241 | 构造函数
2242 |
2243 | 文件头
2244 | 数据
2245 |
2246 |
2247 |
2248 | 获取文件头
2249 |
2250 |
2251 |
2252 |
2253 | 获取数据
2254 |
2255 |
2256 |
2257 |
2258 | 获取数据内容
2259 |
2260 |
2261 |
2262 |
2263 | 收到新闻数据事件类
2264 |
2265 |
2266 |
2267 |
2268 | 构造函数
2269 |
2270 | 文件头
2271 | 数据
2272 |
2273 |
2274 |
2275 | 文件头
2276 |
2277 |
2278 |
2279 |
2280 | 数据
2281 |
2282 |
2283 |
2284 |
2285 | 数据内容
2286 |
2287 |
2288 |
2289 |
2290 | 收到证券代码表事件类
2291 |
2292 |
2293 |
2294 |
2295 | 获取代码表数组
2296 |
2297 |
2298 |
2299 |
2300 | 红茶接口登录事件数据类
2301 |
2302 |
2303 |
2304 |
2305 | 构造函数
2306 |
2307 | 登录状态(1表示登录成功)
2308 |
2309 |
2310 |
2311 | 获取登录状态
2312 |
2313 |
2314 |
2315 |
2316 | 接口服务实例化工厂类
2317 |
2318 |
2319 |
2320 |
2321 | 创建接口数据服务对象
2322 |
2323 | 数据服务对象
2324 |
2325 |
2326 |
2327 |
--------------------------------------------------------------------------------