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.
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.
-
Prepare a computer with Windows 7/8/10/Server 2008 (64-bit) installed.
-
Install Anaconda 5.2.0, please make sure you download Python 2.7 (32-bit).
-
Install MongoDB, please register MongoDB as Windows Service.
-
Install Visual C++ Redistributable Packages for VS2013 (32-bit).
-
Run install.bat to install vn.py and all dependencies.
-
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
-
Change the "language" setting in VT_setting.json to "english" (otherwise you will see the GUI in Chinese).
-
Start CryptoTrader by running "python run.py", connect to BitMEX and then you are ready to trade!
-
A large number of Broker and Market Data APIs, all in Python (vnpy.api):
Cryptocurrency Market
-
BitMEX (bitmex)
-
OKEX(okex)
-
Huobi Pro(huobi)
-
Binance(binance)
-
Bitfinex (bitfinex)
-
Coinbase Pro (coinbase)
-
FCoin (fcoin)
-
BigOne (bigone)
-
LBank(lbank)
-
CCXT (ccxt)
International Financial Markets
-
Interactive Brokers(ib)
-
Shanghai Zhida Futures(shzd)
-
Futu Securities (futu)
Chinese Futures Market
-
CTP(ctp)
-
Femas(femas)
-
Kingstar Option(ksotp)
-
XSpeed(xspeed)
Chinese Equity Market
-
LTS(lts)
-
QDP(qdp)
-
CSHSHLP(cshshlp)
-
XSpeed Securities (sec)
Chinese Precious Metal Market
-
SGIT(sgit)
-
Kingstar Gold(ksgold)
-
-
Simple but powerful event engine module (vnpy.event), which can be used for developing complex quantitative trading strategies
-
RPC framework (vnpy.rpc) which also supports pushing data from server to client, aimed at implementing distributed trading systems.
-
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.
-
Examples about how to use vn.py framework for solving real world trading issues (vnpy.examples).
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.
MIT