├── LICENSE ├── README.md └── SWIG封装CTP对接Java ├── 1.SWIG软件 └── swig-4.0.0.7z ├── 2.代码生成和编译 ├── 1.自动生成封装代码 │ ├── README.md │ ├── SWIG_6.3.15_20190220 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctpv6v3v15x64api.i │ │ └── run_swig.bat │ ├── SWIG_6.3.19_P1_20200106 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctpv6v3v19p1x64api.i │ │ └── run_swig.bat │ ├── SWIG_6.3.19_T1_20200423 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctpv6v3v19t1x64api.i │ │ └── run_swig.bat │ ├── SWIG_6.5.1_20200908 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctpv6v5v1x64api.i │ │ └── run_swig.bat │ ├── SWIG_6.5.1_CP_20200904 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctpv6v5v1cpx64api.i │ │ └── run_swig.bat │ └── SWIG_CTP2mini_V1.5_20191126 │ │ ├── ThostFtdcMdApi.h │ │ ├── ThostFtdcTraderApi.h │ │ ├── ThostFtdcUserApiDataType.h │ │ ├── ThostFtdcUserApiStruct.h │ │ ├── jctp2miniv1v5x64api.i │ │ └── run_swig.bat └── 2.编译C++ │ ├── Linux │ └── ctp_workspace.7z │ ├── README.md │ └── Windows │ ├── README.md │ ├── jctpapi.zip │ └── libiconv-for-Windows.7z └── 3.上期技术资料 └── 接口 ├── 6.5.1API-for-server.zip ├── CTP2mini_V1.5_20191126.zip ├── traderapi_v6.3.19_P1.zip ├── v6.3.19_T1_20200423_traderapi.zip ├── v6.5.1_CP_20200904_tradeapi.zip └── 看穿式监管生产版本(版本号v6.3.15_20190220 203953)6.3.15_20190220.zip /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 sun0x00@gmail.com 4 | 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # redtorch-resources 2 | 3 | *在您下载和使用本项目前,请务必阅读相关协议和注意事项* 4 | 5 | ## 项目简介 6 | 7 | 本项目隶属于项目[RedTorch](https://github.com/sun0x00/redtorch "RedTorch"),提供各类资料、第三方接口封装细节等 8 | 9 | ## 主要开发语言 10 | + 不特定 11 | 12 | ## CTP 封装 13 | 14 | ** 细节性提示,请注意阅读细分目录下的README.md文件 ** 15 | 16 | 当前封装既解决了普通字符串乱码的问题,也完全解决了CTP结算单截断传输造成的乱码问题。 17 | 18 | 已封装的版本 19 | 20 | + CTP 6.5.1_CP (看穿式,一般用于接入生产前在期货公司报备测试) 21 | 22 | + CTP 6.5.1 (看穿式,生产版本) 23 | 24 | + CTP 6.3.19_T1 (看穿式,一般用于接入生产前在期货公司报备测试) 25 | 26 | + CTP 6.3.19_P1 (看穿式,生产版本) 27 | 28 | + CTP 6.3.15 (看穿式,生产版本) 29 | 30 | + CTP CTP2mini_V1.5 (看穿式,CTP-mini柜台) 31 | 32 | ## 使用协议(License) 33 | MIT 34 | 35 | **用户在遵循MIT协议的同时,如果用户下载、安装、使用本项目中所提供的软件,软件作者对任何原因在使用本项目中提供的软件时可能对用户自己或他人造成的任何形式的损失和伤害不承担任何责任。作者有权根据有关法律、法规的变化修改本项目协议。修改后的协议会随附于本项目的新版本中。当发生有关争议时,以最新的协议文本为准。如果用户不同意改动的内容,用户可以自行删除本项目。如果用户继续使用本项目,则视为您接受本协议的变动。** 36 | 37 | ## 友情提示 38 | 39 | **市场莫测 风险自负** 40 | **请务必充分理解各类相关风险** -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/1.SWIG软件/swig-4.0.0.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/1.SWIG软件/swig-4.0.0.7z -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/README.md -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/jctpv6v3v15x64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | %module(directors="1") jctpv6v3v15x64api 20 | %include "various.i" 21 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 22 | %{ 23 | #include "ThostFtdcMdApi.h" 24 | #include "ThostFtdcTraderApi.h" 25 | #include "iconv.h" 26 | %} 27 | 28 | %typemap(out) char[ANY], char[] { 29 | if ($1) { 30 | iconv_t cd = iconv_open("utf-8", "gb2312"); 31 | if (cd != reinterpret_cast(-1)) { 32 | char buf[4096] = {}; 33 | char **in = &$1; 34 | char *out = buf; 35 | size_t inlen = strlen($1), outlen = 4096; 36 | 37 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 38 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 39 | iconv_close(cd); 40 | } 41 | } 42 | } 43 | 44 | %feature("director") CThostFtdcMdSpi; 45 | %ignore THOST_FTDC_VTC_BankBankToFuture; 46 | %ignore THOST_FTDC_VTC_BankFutureToBank; 47 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 48 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 49 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 50 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 52 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 53 | 54 | %include "ThostFtdcUserApiDataType.h" 55 | %include "ThostFtdcUserApiStruct.h" 56 | %include "ThostFtdcMdApi.h" 57 | %feature("director") CThostFtdcTraderSpi; 58 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.15_20190220/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp.x64v6v3v15v.api -outdir java_src -o jctpv6v3v15x64api_wrap.cpp jctpv6v3v15x64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/jctpv6v3v19p1x64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | %module(directors="1") jctpv6v3v19p1x64api 20 | %include "various.i" 21 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 22 | %{ 23 | #include "ThostFtdcMdApi.h" 24 | #include "ThostFtdcTraderApi.h" 25 | #include "iconv.h" 26 | %} 27 | 28 | %typemap(out) char[ANY], char[] { 29 | if ($1) { 30 | iconv_t cd = iconv_open("utf-8", "gb2312"); 31 | if (cd != reinterpret_cast(-1)) { 32 | char buf[4096] = {}; 33 | char **in = &$1; 34 | char *out = buf; 35 | size_t inlen = strlen($1), outlen = 4096; 36 | 37 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 38 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 39 | iconv_close(cd); 40 | } 41 | } 42 | } 43 | 44 | %feature("director") CThostFtdcMdSpi; 45 | %ignore THOST_FTDC_VTC_BankBankToFuture; 46 | %ignore THOST_FTDC_VTC_BankFutureToBank; 47 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 48 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 49 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 50 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 52 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 53 | 54 | %include "ThostFtdcUserApiDataType.h" 55 | %include "ThostFtdcUserApiStruct.h" 56 | %include "ThostFtdcMdApi.h" 57 | %feature("director") CThostFtdcTraderSpi; 58 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_P1_20200106/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp.x64v6v3v19p1v.api -outdir java_src -o jctpv6v3v19p1x64api_wrap.cpp jctpv6v3v19p1x64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/jctpv6v3v19t1x64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | %module(directors="1") jctpv6v3v19t1x64api 20 | %include "various.i" 21 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 22 | %{ 23 | #include "ThostFtdcMdApi.h" 24 | #include "ThostFtdcTraderApi.h" 25 | #include "iconv.h" 26 | %} 27 | 28 | %typemap(out) char[ANY], char[] { 29 | if ($1) { 30 | iconv_t cd = iconv_open("utf-8", "gb2312"); 31 | if (cd != reinterpret_cast(-1)) { 32 | char buf[4096] = {}; 33 | char **in = &$1; 34 | char *out = buf; 35 | size_t inlen = strlen($1), outlen = 4096; 36 | 37 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 38 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 39 | iconv_close(cd); 40 | } 41 | } 42 | } 43 | 44 | %feature("director") CThostFtdcMdSpi; 45 | %ignore THOST_FTDC_VTC_BankBankToFuture; 46 | %ignore THOST_FTDC_VTC_BankFutureToBank; 47 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 48 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 49 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 50 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 52 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 53 | 54 | %include "ThostFtdcUserApiDataType.h" 55 | %include "ThostFtdcUserApiStruct.h" 56 | %include "ThostFtdcMdApi.h" 57 | %feature("director") CThostFtdcTraderSpi; 58 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.3.19_T1_20200423/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp.x64v6v3v19t1v.api -outdir java_src -o jctpv6v3v19t1x64api_wrap.cpp jctpv6v3v19t1x64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/jctpv6v5v1x64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | %module(directors="1") jctpv6v5v1x64api 20 | %include "various.i" 21 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 22 | %{ 23 | #include "ThostFtdcMdApi.h" 24 | #include "ThostFtdcTraderApi.h" 25 | #include "iconv.h" 26 | %} 27 | 28 | %typemap(out) char[ANY], char[] { 29 | if ($1) { 30 | iconv_t cd = iconv_open("utf-8", "gb18030"); 31 | if (cd != reinterpret_cast(-1)) { 32 | char buf[4096] = {}; 33 | char **in = &$1; 34 | char *out = buf; 35 | size_t inlen = strlen($1), outlen = 4096; 36 | 37 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 38 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 39 | iconv_close(cd); 40 | } 41 | } 42 | } 43 | 44 | %feature("director") CThostFtdcMdSpi; 45 | %ignore THOST_FTDC_VTC_BankBankToFuture; 46 | %ignore THOST_FTDC_VTC_BankFutureToBank; 47 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 48 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 49 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 50 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 52 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 53 | 54 | %include "ThostFtdcUserApiDataType.h" 55 | %include "ThostFtdcUserApiStruct.h" 56 | %include "ThostFtdcMdApi.h" 57 | %feature("director") CThostFtdcTraderSpi; 58 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_20200908/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp.x64v6v5v1v.api -outdir java_src -o jctpv6v5v1x64api_wrap.cpp jctpv6v5v1x64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/jctpv6v5v1cpx64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | %module(directors="1") jctpv6v5v1cpx64api 20 | %include "various.i" 21 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 22 | %{ 23 | #include "ThostFtdcMdApi.h" 24 | #include "ThostFtdcTraderApi.h" 25 | #include "iconv.h" 26 | %} 27 | 28 | %typemap(out) char[ANY], char[] { 29 | if ($1) { 30 | iconv_t cd = iconv_open("utf-8", "gb18030"); 31 | if (cd != reinterpret_cast(-1)) { 32 | char buf[4096] = {}; 33 | char **in = &$1; 34 | char *out = buf; 35 | size_t inlen = strlen($1), outlen = 4096; 36 | 37 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 38 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 39 | iconv_close(cd); 40 | } 41 | } 42 | } 43 | 44 | %feature("director") CThostFtdcMdSpi; 45 | %ignore THOST_FTDC_VTC_BankBankToFuture; 46 | %ignore THOST_FTDC_VTC_BankFutureToBank; 47 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 48 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 49 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 50 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 52 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 53 | 54 | %include "ThostFtdcUserApiDataType.h" 55 | %include "ThostFtdcUserApiStruct.h" 56 | %include "ThostFtdcMdApi.h" 57 | %feature("director") CThostFtdcTraderSpi; 58 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_6.5.1_CP_20200904/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp.x64v6v5v1cpv.api -outdir java_src -o jctpv6v5v1cpx64api_wrap.cpp jctpv6v5v1cpx64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcMdApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcTraderApi.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcUserApiDataType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcUserApiDataType.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/ThostFtdcUserApiStruct.h -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/jctp2miniv1v5x64api.i: -------------------------------------------------------------------------------- 1 | /* 2 | Depending on your operating system and version of Java and how you are using threads, 3 | you might find the JVM hangs on exit. There are a couple of solutions to try out. The 4 | preferred solution requires jdk-1.4 and later and uses AttachCurrentThreadAsDaemon 5 | instead of AttachCurrentThread whenever a call into the JVM is required. This can be 6 | enabled by defining the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro when compiling 7 | the C++ wrapper code.For older JVMs define SWIG_JAVA_NO_DETACH_CURRENT_THREAD instead, 8 | to avoid the DetachCurrentThread call but this will result in a memory leak instead. 9 | For further details inspect the source code in the java/director.swg library file. 10 | */ 11 | 12 | /* 13 | %insert("runtime") %{ 14 | #define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON 15 | #define SWIG_JAVA_NO_DETACH_CURRENT_THREAD 16 | %} 17 | */ 18 | 19 | 20 | %module(directors="1") jctp2miniv1v5x64api 21 | %include "various.i" 22 | %apply char **STRING_ARRAY { char *ppInstrumentID[] } 23 | %{ 24 | #include "ThostFtdcMdApi.h" 25 | #include "ThostFtdcTraderApi.h" 26 | #include "iconv.h" 27 | %} 28 | 29 | %typemap(out) char[ANY], char[] { 30 | if ($1) { 31 | iconv_t cd = iconv_open("utf-8", "gb2312"); 32 | if (cd != reinterpret_cast(-1)) { 33 | char buf[4096] = {}; 34 | char **in = &$1; 35 | char *out = buf; 36 | size_t inlen = strlen($1), outlen = 4096; 37 | 38 | if (iconv(cd, in, &inlen, &out, &outlen) != static_cast(-1)) 39 | $result = JCALL1(NewStringUTF, jenv, (const char *)buf); 40 | iconv_close(cd); 41 | } 42 | } 43 | } 44 | 45 | %feature("director") CThostFtdcMdSpi; 46 | %ignore THOST_FTDC_VTC_BankBankToFuture; 47 | %ignore THOST_FTDC_VTC_BankFutureToBank; 48 | %ignore THOST_FTDC_VTC_FutureBankToFuture; 49 | %ignore THOST_FTDC_VTC_FutureFutureToBank; 50 | %ignore THOST_FTDC_FTC_BankLaunchBankToBroker; 51 | %ignore THOST_FTDC_FTC_BrokerLaunchBankToBroker; 52 | %ignore THOST_FTDC_FTC_BankLaunchBrokerToBank; 53 | %ignore THOST_FTDC_FTC_BrokerLaunchBrokerToBank; 54 | 55 | %include "ThostFtdcUserApiDataType.h" 56 | %include "ThostFtdcUserApiStruct.h" 57 | %include "ThostFtdcMdApi.h" 58 | %feature("director") CThostFtdcTraderSpi; 59 | %include "ThostFtdcTraderApi.h" -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/1.自动生成封装代码/SWIG_CTP2mini_V1.5_20191126/run_swig.bat: -------------------------------------------------------------------------------- 1 | swig.exe -c++ -java -package xyz.redtorch.gateway.ctp2mini.x64v1v5v.api -outdir java_src -o jctp2miniv1v5x64api_wrap.cpp jctp2miniv1v5x64api.i 2 | 3 | pause 4 | -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Linux/ctp_workspace.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Linux/ctp_workspace.7z -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/README.md -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/README.md -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/jctpapi.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/jctpapi.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/libiconv-for-Windows.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/2.代码生成和编译/2.编译C++/Windows/libiconv-for-Windows.7z -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/6.5.1API-for-server.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/6.5.1API-for-server.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/CTP2mini_V1.5_20191126.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/CTP2mini_V1.5_20191126.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/traderapi_v6.3.19_P1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/traderapi_v6.3.19_P1.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/v6.3.19_T1_20200423_traderapi.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/v6.3.19_T1_20200423_traderapi.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/v6.5.1_CP_20200904_tradeapi.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/v6.5.1_CP_20200904_tradeapi.zip -------------------------------------------------------------------------------- /SWIG封装CTP对接Java/3.上期技术资料/接口/看穿式监管生产版本(版本号v6.3.15_20190220 203953)6.3.15_20190220.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sun0x00/redtorch-resources/dda8eb840f20691ab15af0b2ff4cbc15b240410e/SWIG封装CTP对接Java/3.上期技术资料/接口/看穿式监管生产版本(版本号v6.3.15_20190220 203953)6.3.15_20190220.zip --------------------------------------------------------------------------------