修复vn.oanda中地址错误的bug

This commit is contained in:
lyic 2016-03-09 20:01:40 +08:00
parent 6aa67354a9
commit 9c3a5fce52
3 changed files with 16 additions and 17 deletions

View File

@ -9,7 +9,7 @@ from threading import Thread
API_SETTING = {}
API_SETTING['practice'] = {'rest': 'https://api-fxpractice.oanda.com',
'stream': 'https://stream-fxpractice.oanda.com'}
API_SETTING['trade'] = {'rest': 'https://api-fxpractice.oanda.com',
API_SETTING['trade'] = {'rest': 'https://api-fxtrade.oanda.com',
'stream': 'https://stream-fxtrade.oanda.com/'}

View File

@ -181,15 +181,13 @@ class DoubleEmaDemo(CtaTemplate):
########################################################################################
## 基于tick级别细粒度撤单追单测试demo
class OrderManagementDemo(CtaTemplate):
"""追撤单策略Demo"""
"""基于tick级别细粒度撤单追单测试demo"""
className = 'OrderManagementDemo'
author = u'用Python的交易员'
# 策略参数
initDays = 10 # 初始化数据所用的天数
# 策略变量
@ -270,6 +268,7 @@ class OrderManagementDemo(CtaTemplate):
self.sendOrder(self.orderType, self.tick.lastprice - 10, 1)
self.lastOrder = None
#----------------------------------------------------------------------
def onBar(self, bar):
"""收到Bar推送必须由用户继承实现"""

View File

@ -9,7 +9,7 @@ from threading import Thread
API_SETTING = {}
API_SETTING['practice'] = {'rest': 'https://api-fxpractice.oanda.com',
'stream': 'https://stream-fxpractice.oanda.com'}
API_SETTING['trade'] = {'rest': 'https://api-fxpractice.oanda.com',
API_SETTING['trade'] = {'rest': 'https://api-fxtrade.oanda.com',
'stream': 'https://stream-fxtrade.oanda.com/'}