vnpy/vn.ctp/readme.md

80 lines
1.6 KiB
Markdown
Raw Normal View History

2016-07-02 03:12:44 +00:00
# vn.ctp
### <20><><EFBFBD><EFBFBD>
CTP<EFBFBD><EFBFBD>̨API<EFBFBD>ӿڵ<EFBFBD>Python<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>pyscriptĿ¼<EFBFBD>µĽű<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɷ<EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>ṩԭ<EFBFBD><EFBFBD>C++ API<50>е<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD>ܡ<EFBFBD>
### Ŀ¼˵<C2BC><CBB5>
* vnctpmd: <20><><EFBFBD><EFBFBD>API
* vnctptd: <20><><EFBFBD><EFBFBD>API
* pyscript: <20>Զ<EFBFBD><D4B6><EFBFBD>װ<EFBFBD>ű<EFBFBD>
* ctpapi<70><69>C++ API<50>ļ<EFBFBD>
### ʹ<><CAB9>CMake<6B><65><EFBFBD><EFBFBD>
**Windows 7**
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
* Anaconda<64><61>Boost<73>İ<EFBFBD>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD><EFBFBD>ο<EFBFBD>www.vnpy.org<72>ϵĽ̳̣<CCB3><CCA3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>32λ
* cmake:<3A><>װ<EFBFBD><D7B0><EFBFBD>°汾<C2B0><E6B1BE>cmake,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EBBBB7>
* <20><><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BOOST_ROOT = C:\boost_1_57_0
* <20><><EFBFBD><EFBFBD>ߣ<EFBFBD>Visual Studio 2013
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
* <20><>vn.ctpĿ¼<C4BF><C2BC><EFBFBD>½<EFBFBD><C2BD>ļ<EFBFBD><C4BC>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊbuild, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룺cmake-gui .. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>cmake<6B><65><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>
* <20><><EFBFBD><EFBFBD>configure<72><65>
* <20><><EFBFBD><EFBFBD>generate<74><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>óɹ<C3B3>
* <20><><EFBFBD><EFBFBD>buildĿ¼<C4BF><C2BC>˫<EFBFBD><CBAB>vn_ctp_api.sln<6C>򿪽<EFBFBD><F2BFAABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밴ť,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>release<73><65>
**Linux (Debian jessie, Ubuntu 16.04)**
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>
* <20>ο<EFBFBD>[<5B><><EFBFBD><EFBFBD>](http://www.continuum.io/downloads)<29>Ľ̳<C4BD><CCB3><EFBFBD><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>װAnaconda<64><61>Linux 64λ<34>
* ʹ<><CAB9>apt-get<65><74>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĹ<D8B5><C4B9>ߣ<EFBFBD>
- apt-get install build-essential
- apt-get install libboost-all-dev
- apt-get install python-dev
- apt-get install cmake
* <20><><EFBFBD><EFBFBD><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ctp api tar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v6.3.5_20150803_tradeapi_linux64.tar<61><72><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ctp api so<73>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD><D4BA>Ըò<D4B8><C3B2><EFBFBD><E8A3A9>
- thostmduserapi.so --> libthostmduserapi.so
- thosttraderapi.so --> libthosttraderapi.so
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD>
* <20><>ǰĿ¼<C4BF><C2BC><EFBFBD><EFBFBD>build.sh<73><68><EFBFBD><EFBFBD><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD>
### API<50>
<EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>2015-08-04
<EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>fsopt_traderapi
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȨAPI
<EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>[http://www.sfit.com.cn/5_2_DocumentDown.htm](http://www.sfit.com.cn/5_2_DocumentDown.htm)
˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ctpapi<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD>Windows<EFBFBD><EFBFBD>32λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>x64_linux<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>Linux<EFBFBD><EFBFBD>64λ<EFBFBD>