更新readme

This commit is contained in:
chenxy123 2016-06-11 17:10:20 +08:00
parent f44dc7c751
commit 0eb14ecb74
2 changed files with 32 additions and 25 deletions

View File

@ -1,5 +1,12 @@
# vn.py - 基于python的开源交易平台开发框架
### 论坛
新的论坛[维恩的派](http://www.vnpie.com)已经上线感谢量衍投资对vn.py项目的支持
如果你在使用vn.py的过程中有任何疑问想求助或者经验想分享欢迎到维恩的派上面发帖项目作者和其他主要贡献者也会每天阅帖保证回复的效率。
---
### Quick Start

View File

@ -330,7 +330,7 @@ def main():
api.subscribePublicTopic(1)
# 注册前置机地址,测试通过
api.registerFront("tcp://211.144.195.163:34505")
api.registerFront("tcp://211.144.195.163:54505")
# 初始化api连接前置机测试通过
api.init()
@ -367,30 +367,30 @@ def main():
#sleep(0.5)
###############################################
# 发单测试, 测试通过
reqid = reqid + 1
req = {}
req['InvestorID'] = api.userID
req['UserID'] = api.userID
req['BrokerID'] = api.brokerID
req['InstrumentID'] = '510050'
req['ExchangeID'] = 'SSE'
req['OrderPriceType'] = defineDict['SECURITY_FTDC_OPT_LimitPrice']
req['LimitPrice'] = '0.1850'
req['VolumeTotalOriginal'] = 1
req['Direction'] = defineDict['SECURITY_FTDC_D_Buy']
req['CombOffsetFlag'] = defineDict['SECURITY_FTDC_OF_Open']
req['OrderRef'] = '10'
req['CombHedgeFlag'] = defineDict['SECURITY_FTDC_HF_Speculation']
req['ContingentCondition'] = defineDict['SECURITY_FTDC_CC_Immediately']
req['ForceCloseReason'] = defineDict['SECURITY_FTDC_FCC_NotForceClose']
req['IsAutoSuspend'] = 0
req['UserForceClose'] = 0
req['TimeCondition'] = defineDict['SECURITY_FTDC_TC_GFD']
req['VolumeCondition'] = defineDict['SECURITY_FTDC_VC_AV']
req['MinVolume'] = 1
i = api.reqOrderInsert(req, reqid)
sleep(1.0)
# # 发单测试, 测试通过
# reqid = reqid + 1
# req = {}
# req['InvestorID'] = api.userID
# req['UserID'] = api.userID
# req['BrokerID'] = api.brokerID
# req['InstrumentID'] = '510050'
# req['ExchangeID'] = 'SSE'
# req['OrderPriceType'] = defineDict['SECURITY_FTDC_OPT_LimitPrice']
# req['LimitPrice'] = '0.1850'
# req['VolumeTotalOriginal'] = 1
# req['Direction'] = defineDict['SECURITY_FTDC_D_Buy']
# req['CombOffsetFlag'] = defineDict['SECURITY_FTDC_OF_Open']
# req['OrderRef'] = '10'
# req['CombHedgeFlag'] = defineDict['SECURITY_FTDC_HF_Speculation']
# req['ContingentCondition'] = defineDict['SECURITY_FTDC_CC_Immediately']
# req['ForceCloseReason'] = defineDict['SECURITY_FTDC_FCC_NotForceClose']
# req['IsAutoSuspend'] = 0
# req['UserForceClose'] = 0
# req['TimeCondition'] = defineDict['SECURITY_FTDC_TC_GFD']
# req['VolumeCondition'] = defineDict['SECURITY_FTDC_VC_AV']
# req['MinVolume'] = 1
# i = api.reqOrderInsert(req, reqid)
# sleep(1.0)
# 撤单测试,测试通过
#reqid = reqid + 1