C#版CTP交易和行情接口类库,在原基础上进行二次封装,支持32位和64位自适应,支持多账户多实例,入参和出参全部使用C#实体类,返回结果支持MVVM绑定。 x86和amd64文件夹内的文件为MdApi.dll、TradeApi.dll、thostmduserapi.dll、thosttraderapi.dll,需要将这两个文件夹复制到当前程序文件夹。
CTP版本6.3.16_20190305 看穿式监管版查看分支ctpse
C# trade api library for CTP
License: Apache License 2.0
C#版CTP交易和行情接口类库,在原基础上进行二次封装,支持32位和64位自适应,支持多账户多实例,入参和出参全部使用C#实体类,返回结果支持MVVM绑定。 x86和amd64文件夹内的文件为MdApi.dll、TradeApi.dll、thostmduserapi.dll、thosttraderapi.dll,需要将这两个文件夹复制到当前程序文件夹。
CTP版本6.3.16_20190305 看穿式监管版查看分支ctpse
我在执行CTPMarketApi.Tests中的测试用例时,登陆connect时会报这个错误。
这个封装ctp接口里面有包括期权的接口吗?如果没有,怎么能把期权的接口加到封装里去,还是只能单独封装,不知道有做过的没?
在快期下单成交,回调函数执行了
public void RtnTrade(ref CThostFtdcTradeField pTrade)
{
Console.WriteLine("成交查询成功, TradeID: {0}", pTrade.TradeID);
}
但是执行完后,网络就断开了,执行了下面的回调,nReasion是4097,这是什么原因?
_api.OnDisconnected += new TradeApi.Disconnected((int nReasion) =>
{
_isConnected = false;
});
这样交流会不会更容易些!
楼主,请问这个代码是否支持多账户同时登录和交易?
不太懂C++,只是简单替换文件,和修复编译错误。但是WPF调用时,退出总是报这个错误,不知道怎么处理。
希望作者继续更新,我可以捐些款
问题签名:
问题事件名称: BEX
应用程序名: AutoFutures.Wpf.exe
应用程序版本: 1.0.0.0
应用程序时间戳: c354b336
故障模块名称: thostmduserapi_se.dll_unloaded
故障模块版本: 0.0.0.0
故障模块时间戳: 606bb06b
异常偏移: 0f36fa00
异常代码: c0000005
异常数据: 00000008
OS 版本: 6.1.7601.2.1.0.256.1
区域设置 ID: 2052
其他信息 1: be7b
其他信息 2: be7b94eb5da661025c613c2e758ff9e4
其他信息 3: be7b
其他信息 4: be7b94eb5da661025c613c2e758ff9e4
楼主您好,我目前在用websocket+ctp 来做模拟交易,
我发现不同的用户登录交易,他们会互踢,假如a先登录,然后b登录,最后登录的b会踢掉先前登录的a。
你有这种情况吗?
请教个问题,调用ctp获取所有合约_trader.QueryInstrument(1);,但是合约获取的不全,像IC,只取到了IC1912和IC2001,其他IC的没有,包括期权的,只取到九百多条,有可能是什么原因?谢谢
文件路径为:\CTPSharp\CTPTradeApi\DataCollect.cs
public DataCollect()
{
try
{
string path = Path.GetFullPath(string.Format("{0}\\{1}", LibraryWrapper.ProcessorArchitecture,
DllName));
_wrapper = new LibraryWrapper(path);
if(LibraryWrapper.ProcessorArchitecture == "x86") {
getSystemInfo = _wrapper.GetUnmanagedFunction<DelegateGetSystemInfo>("?CTP_GetSystemInfo@@YAHPADAAH@Z");
} else {
getSystemInfo = _wrapper.GetUnmanagedFunction<DelegateGetSystemInfo>("?CTP_GetSystemInfo@@YAHPEADAEAH@Z");
}
}
catch (Exception ex)
{
throw ex;
}
}
System.Exception:“Failed to get unmanaged function for name: ?CTP_GetSystemInfo@@YAHPADAAH@Z”
then,how can i do next. do you have some contract ways?
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.