vnpy/vn.ctp/readme.md

81 lines
1.9 KiB
Markdown
Raw Normal View History

# 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>
**<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>**
* <20><><EFBFBD>鰲װ<E9B0B2><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD>һ<EFBFBD>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>װ32λ<32><CEBB>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD>32λ<32><CEBB>
* cmake:<3A><>װ<EFBFBD><D7B0><EFBFBD>°汾<C2B0><E6B1BE>cmake,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EBBBB7>
* [Boost1.57.0](http://sourceforge.net/projects/boost/files/boost/1.57.0/)<29><EFBFBD><E2A3BA><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բο<D4B2>[Boost Getting Started](http://www.boost.org/doc/libs/1_58_0/more/getting_started/)<29><><EFBFBD>½ǵ<C2BD><C7B5><EFBFBD><EFBFBD><EFBFBD>
2016-02-27 14:35:51 +00:00
* <20><><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>eg: BOOST_ROOT = C:\boost_1_57_0
2016-02-27 14:35:51 +00:00
* <20><><EFBFBD><EFBFBD>32λ<32><EFBFBD><E2BBB9>64λ<34><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>
2016-02-27 14:35:51 +00:00
* <20><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>boost python, thread, system, chrono, date_time<6D><65>5<EFBFBD><35><EFBFBD><EFBFBD><E2A3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ӳ<EFBFBD>̿ռ
2016-02-27 14:35:51 +00:00
* boost python<6F>Ķ<EFBFBD>̬<EFBFBD><CCAC>64bits<74><73><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>address-model=64<36><34><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><DFB1>뾲̬<EBBEB2><CCAC>
* [Anaconda1.9.2](http://repo.continuum.io/archive/index.html): <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ذ<EFBFBD><D8B0><EFBFBD>Python<6F><6E><EFBFBD>а<EFBFBD>
* <20><><EFBFBD><EFBFBD>ߣ<EFBFBD>windows<77><73>ѡ<EFBFBD><D1A1>visual studio 2013<31><33>linux<75><78>ʹ<EFBFBD><CAB9>g++<2B><>
Linux: (Debian jessie)
* apt-get install build-essential
* apt-get install libboost-all-dev
* apt-get install python-dev
* apt-get install cmake
* <20><><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><EFBFBD><EFBFBD><EFBFBD>ctp api so<73>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
2016-02-27 14:35:51 +00:00
* thostmduserapi.so --> libthostmduserapi.so
2016-02-27 14:35:51 +00:00
* thosttraderapi.so --> libthosttraderapi.so
**<2A><><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>
2016-02-27 14:35:51 +00:00
**Linux: (Debian jessie)**
* <20><>ǰĿ¼<C4BF><C2BC><EFBFBD><EFBFBD>build.sh<73><68><EFBFBD><EFBFBD><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD>
## API<50>
<EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>2015-08-04
2016-02-27 14:35:51 +00:00
<EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>fsopt_traderapi
2016-02-27 14:35:51 +00:00
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȨAPI
2016-02-27 14:35:51 +00:00
<EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>[http://www.sfit.com.cn/5_2_DocumentDown.htm](http://www.sfit.com.cn/5_2_DocumentDown.htm)
2016-02-27 14:35:51 +00:00
˵<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>