This project provides kdb+/q support for 4 distinct sets of APIs provided by Wind Information Co., Ltd, a Chinese financial information and solutions provider:
- Wind Quant API, a Quants API that also provides some market data feeds;
- Wind TDF API, a read-time data feed API for Chinese financial market data;
- Development suspended (prefer utilizing TDF API for any supported languages to construct feedhandler executables directly, which should be much easier than building TDF into a DLL).
- Wind TDB API, a historical database API for what is provided by TDF API at real-time;
- Wind RD Database, a Quants research database for global markets.
本项目提供了四个kdb+/q的接口,用于连接万得Wind几个不同的编程接口:
- Wind Quant API——量化编程接口(机构版);
- Wind TDF API——实时市场数据流接口;
- 暂停开发(推荐使用各种语言的TDF API直接写feedhandler程序,这样做远比把TDF封包成DLL要容易得多)
- Wind TDB API——对应TDF API的历史市场数据接口;
- Wind RD Database——量化研究数据库。
本项目是使用Visual Studio 2013编译的工程。与zwz的《WindKdb+数据及交易接口V1.1》不同,本工程对Wind Quant API的支持直接使用WindQuantData.dll
的API而不须使用基于COM的WAPIWrapperCpp.dll
。虽然没有使用WAPIWrapperCpp.dll
,不过本接口已经把所有接数的函数封装为同步函数(WSQ
/TDQ
数据订阅函数除外),以方便在q程序内使用。
如果您使用正版的Visual Studio 2013,则本工程只需要Kx的k.h
(须作少许改动)和q.lib
即可编译通过。(如需运行单元测试项目Test_kdb+.util
,则还额外需要c.lib
和c.dll
。)
如果您使用的是免费版的Visual Studio Express 2013,则本工程还额外需要Windows Driver Kit (WDK) v7.1.0中的头文件和库方可编译。为方便直接使用,压缩包里还包括了工程编译后生成的DLL(在Release目录中)。
对k.h
所作的改动:
-
Lines 88–89:
#define isnan _isnan #define finite _finite
Comment out these two lines to avoid masking corresponding C++11 functions from MSVC 2013.
-
Line 90:
extern double log(double);
Comment out this line to avoid conflicting signature in
math.h
from MSVC 2013.
- 2015.02.27
- Initial version to support most APIs in
WindQuantData.dll
- Initial version to support most APIs in
- 2015.03.06
- Initial merge into GitHub
- Added missing support for
WST
function - Fixed problem with
WSQ
subscribers being not able to modify global data in q
- 2015.03–04
- Various bug fixes
- 2015.07
- Added support for Wind TDF/TDB APIs -- Only part of the APIs have been implemented, still work in progress...
- 2015.08
- Suspended development for TDF API due to the lack of need
- More complete API support for TDB
- 2015.12
- Added simple ODBC-based wrapper for RD database