https://github.com/QuantBox/QuantBox_XAPI
此目录下提供CTP接口相关的文档和接口
将CTP的C++接口转C接口
通过C#来对接C-CTP项目生成的C版dll
Matlab对接.Net版CTP接口
通过Java来对接C-CTP项目生成的C版dll
已经不再维护,请移步到XAPI2项目
Home Page: https://github.com/QuantBox/XAPI2
https://github.com/QuantBox/QuantBox_XAPI
此目录下提供CTP接口相关的文档和接口
将CTP的C++接口转C接口
通过C#来对接C-CTP项目生成的C版dll
Matlab对接.Net版CTP接口
通过Java来对接C-CTP项目生成的C版dll
打包下载的5月25日更新的Matlab .Net版,更改本地目录,运行后出现如下错误:
Error using test (line 11)
Message: 无法加载 DLL“QuantBox.C2CTP.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
Source: QuantBox.CSharp2CTP
尝试添加代码 NET.addAssembly(fullfile(cd,'QuantBox.C2CTP.dll')); 在文件头,运行后出现如下错误:
Error using test (line 5)
Message: 未能加载文件或程序集“file:///G:\MATLABCTP\QuantBox.C2CTP.dll”或它的某一个依赖项。该模块应包含一个程序集清单。
Source: mscorlib
想请教一下应当如何解决?本人使用的Matlab版本为2012a
谢谢!
MATLAB crash file:C:\DOCUME1\ADMINI1\LOCALS~1\Temp\matlab_crash_dump.6968-1:
(unknown signal) detected at Wed Dec 12 14:52:31 2012
Configuration:
Crash Decoding : Disabled
Default Encoding: GBK
MATLAB Root : D:\Program Files\MATLAB\R2011b
MATLAB Version : 7.13.0.564 (R2011b)
Operating System: Microsoft Windows XP
Processor ID : x86 Family 15 Model 6 Stepping 3, AuthenticAMD
Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Window System : Version 5.1 (Build 2600: Service Pack 3)
Fault Count: 1
Abnormal termination:
(unknown signal)
Register State (from fault):
EAX = 39c7fa80 EBX = 00000005
ECX = 00000000 EDX = 0000004b
ESP = 39c7fa7c EBP = 39c7fad0
ESI = 39c7fb40 EDI = 37b90338
EIP = 7c812afb EFL = 00000206
CS = 0000001b DS = 00000023 SS = 00000023
ES = 00000023 FS = 0000003b GS = 00000000
Stack Trace (from fault):
[ 0] 0x7c812afb C:\WINDOWS\system32\kernel32.dll+00076539 ( RaiseException+000082 )
[ 1] 0x79222b54 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll+00928596 ( GetCLRFunction+053769 )
[ 2] 0x7926849b C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll+01213595 ( CopyPDBs+019125 )
[ 3] 0x793f9d72 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll+02858354 ( CorLaunchApplication+075914 )
[ 4] 0x7a41ac1c C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\d6e053b4e78f3077025a0c035237d5cc\mscorlib.ni.dll+12168220 ( ???+075914 )
[ 5] 0x384e06cd ( ???+075914 )
[ 6] 0x384e2b40 ( ???+075914 )
[ 7] 0x0d8e75e3 ( ???+075914 )
[ 8] 0x2e251339 D:\GIT\ctp\Matlab-DotNet\test\QuantBox.C2CTP.dll+00004921 ( ???+075914 )
[ 9] 0x2e251070 D:\GIT\ctp\Matlab-DotNet\test\QuantBox.C2CTP.dll+00004208 ( ???+075914 )
[ 10] 0x7c80b729 C:\WINDOWS\system32\kernel32.dll+00046889 ( GetModuleFileNameA+000442 )
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.
我也想写一个多语言动态的封装,但是对比了很多版本,发现都又不大一样的地方。
希望能够找到一份官方的CTP接口,最新的版本。
在eclipse下,类里面的中文显示为这样的: \u7ec4\u5408\u4ea4\u6613\u5408\u7ea6\u7684\u5355\u817f
请问,应该将编码设置为什么呢?
我尝试过GBK、GB2312、UTF-8,都不管用。
订阅2个股指,居然CPU占用50%.
正常订阅全市场,也不会用到1%的cpu
我运行的时候,一直是这个问题。
我没有改变你项目的目录结构,直接git clone下来,然后导入eclipse。
QuartBox.C2CTP.dll在项目的根目录下,可是它一直报这个错。
请问这是怎么回事呀?你有遇到过吗?
请问 quantbox是否支持Level-2行情,在券商有提供的情况下,它能接收Level-2行情么?如果能接收,那该如何操作呢?
文档里面给的示例为,
MdApi.MD_Subscribe(pMdApi, "IF1208");
但该函数声明为
public extern static void MD_Subscribe(IntPtr pMdApi, string inst, string szExchange);
所以写到此处会报错。
请问此处string inst该传入什么?
谢谢
在合约CThostFtdcInstrumentField结构体中有
///当前是否交易
TThostFtdcBoolType IsTrading;
///持仓类型
TThostFtdcPositionTypeType PositionType;
对数据类型的注释为
///净持仓
#define THOST_FTDC_PT_Net '1'
///综合持仓
#define THOST_FTDC_PT_Gross '2'
typedef char TThostFtdcPositionTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPosiDirectionType是一个持仓多空方向类型
/////////////////////////////////////////////////////////////////////////
///净
#define THOST_FTDC_PD_Net '1'
///多头
#define THOST_FTDC_PD_Long '2'
///空头
#define THOST_FTDC_PD_Short '3'
typedef char TThostFtdcPosiDirectionType;
PositionType 和 PositionDateType是什么意思呢?对交易有何影响
您好,我本来是要调用您提供的c#接口进行下单软件的开发,结果在调用交易登录函数时候总是引发异常,而且在下载文件里面直接提供的c接口文件下的那三个dll也是无法使用的,所以想到使用您的c接口程序重新生成时候 结果出现
rror C2664: “PVOID _InlineInterlockedExchangePointer(volatile PVOID ,PVOID)”: 无法将参数 1 从“MSQueue<CCTPMsgQueue::SMsgItem *>::node_t *”转换为“volatile PVOID *”
1> 与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
1> f:\ctp-master\c-ctp\src\quantbox.c2ctp\include\lockfreeq.h(146): 编译类 模板 成员函数“MSQueue<CCTPMsgQueue::SMsgItem *>::pointer_t::pointer_t(const MSQueue<CCTPMsgQueue::SMsgItem *>::pointer_t &)”时
1> f:\ctp-master\c-ctp\src\quantbox.c2ctp\include\lockfreeq.h(214): 参见对正在编译的函数 模板 实例化“MSQueue<CCTPMsgQueue::SMsgItem *>::pointer_t::pointer_t(const MSQueue<CCTPMsgQueue::SMsgItem *>::pointer_t &)”的引用
1> f:\ctp-master\c-ctp\src\quantbox.c2ctp\include\lockfreeq.h(172): 参见对正在编译的类 模板 实例化“MSQueue<CCTPMsgQueue::SMsgItem *>::pointer_t”的引用
1> f:\ctp-master\c-ctp\src\quantbox.c2ctp\ctpmsgqueue.h(271): 参见对正在编译的类 模板 实例化“MSQueue<CCTPMsgQueue::SMsgItem *>”的引用
最终无法生成.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.