[Mod]import rqdatac only if required

This commit is contained in:
vn.py 2019-03-19 18:58:39 +08:00
parent 7c533458ff
commit 59a4def393
4 changed files with 8 additions and 5 deletions

1
docs/cta_strategy.md Normal file
View File

@ -0,0 +1 @@
# Introduction

View File

@ -1,6 +1,7 @@
# vn.py文档
* [Introduction](introduction.md)
* [Install](install.md)
* [Quick Start](quickstart.md)
* [vn.py简介](introduction.md)
* [项目安装](install.md)
* [基本使用](quickstart.md)
* [CTA策略模块](cta_strategy.md)

1
docs/quickstart.md Normal file
View File

@ -0,0 +1 @@
# Introduction

View File

@ -11,8 +11,6 @@ from threading import Thread
from queue import Queue
from copy import copy
import rqdatac
from vnpy.event import Event, EventEngine
from vnpy.trader.engine import BaseEngine, MainEngine
from vnpy.trader.object import (
@ -105,6 +103,8 @@ class CtaEngine(BaseEngine):
if not username or not password:
return
import rqdatac
self.rq_client = rqdatac
self.rq_client.init(username, password,
('rqdatad-pro.ricequant.com', 16011))