2017-04-08 15:40:14 +00:00
# vn.py - By Traders, For Traders.
---
### Brief Introduction
The vn.py project is an open-source quantitative trading framework that is developed by traders, for traders. The project is mainly written in Python and uses C++ for low-layer and performance sensitive infrastructure.
2018-08-12 16:39:57 +00:00
Using the vn.py project, institutional investors and professional traders, such as hedge funds, prop trading firms and investment banks, can easily develop complex trading strategies with the Event Engine Strategy Module, and automatically route their orders to the most desired destinations, including equity, commodity, forex, cryptocurrency and many other financial markets.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
---
### Quick Start
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
1. Prepare a computer with Windows 7/8/10/Server 2008 (64-bit) installed.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
2. Install [Anaconda 5.2.0 ](http://www.continuum.io/downloads ), please make sure you download **Python 2.7 (32-bit)** .
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
3. Install [MongoDB ](https://www.mongodb.org/downloads#production ), please register MongoDB as Windows Service.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
4. Install [Visual C++ Redistributable Packages for VS2013 (32-bit) ](https://www.microsoft.com/en-gb/download/details.aspx?id=40784 ).
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
5. Run **install.bat** to install vn.py and all dependencies.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
6. Go to folder **examples/CryptoTrader/** and edit those **ABC_connect.json** files with your exchange config. Taking BitMEX_connect.json as an example:
* apiKey: the API Key of your account provided by BitMEX
* secretKey: the Secret Key of your account provide by BitMEX
* sessionCount: number of sessions and threads you would like to use for RESTFul request
* symbols: symbols of contract you would like to receive data update from Websocket API
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
7. Change the "language" setting in **VT_setting.json** to "english" (otherwise you will see the GUI in Chinese).
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
8. Start CryptoTrader by running "python run.py", connect to BitMEX and then you are ready to trade!
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
### Project Structure
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
1. A large number of Broker and Market Data APIs, all in Python (vnpy.api):
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
**Cryptocurrency Market**
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- BitMEX (bitmex)
2017-06-07 14:00:14 +00:00
2018-08-12 16:39:57 +00:00
- OKEX( okex)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Huobi Pro( huobi)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Binance( binance)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Bitfinex (bitfinex)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Coinbase Pro (coinbase)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- FCoin (fcoin)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- BigOne (bigone)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- LBank( lbank)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- CCXT (ccxt)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
**International Financial Markets**
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Interactive Brokers( ib)
- Shanghai Zhida Futures( shzd)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Futu Securities (futu)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
**Chinese Futures Market**
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- CTP( ctp)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Femas( femas)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Kingstar Option( ksotp)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- XSpeed( xspeed)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
**Chinese Equity Market**
- LTS( lts)
- QDP( qdp)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- CSHSHLP( cshshlp)
- XSpeed Securities (sec)
**Chinese Precious Metal Market**
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- SGIT( sgit)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
- Kingstar Gold( ksgold)
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
2. Simple but powerful event engine module (vnpy.event), which can be used for developing complex quantitative trading strategies
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
3. RPC framework (vnpy.rpc) which also supports pushing data from server to client, aimed at implementing distributed trading systems.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
4. Ready to use trading platform (vnpy.trader), which has integrated all the trading APIs in vnpy.api, and provides easy to use strategy engines for developing different types of quantitative strategies and trading algorithms.
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
5. Examples about how to use vn.py framework for solving real world trading issues (vnpy.examples).
2017-04-08 15:40:14 +00:00
2018-08-12 16:39:57 +00:00
6. [Official Forum ](http://www.vnpie.org ) and [Github Repository ](http://www.github.com/vnpy/vnpy )
2017-04-08 15:40:14 +00:00
---
### Contact
If you have any questions about how to use the project or any suggestions about improving it, please feel free to email vn.py@foxmail.com.
---
### License
MIT