Loading ...

外部数据源调用不过去

Author: gaoyaxing24, Created: 2021-12-03 11:59:33, Updated: 2021-12-03 12:00:16

配置参数: '''backtest start: 2021-09-04 00:00:00 end: 2021-12-02 00:00:00 period: 1d basePeriod: 1h exchanges: [{“eid”:“Huobi”,“currency”:“BTC_USDT”,“feeder”:“http://171.???.???.176:8000”}] # 此处 IP 为考虑隐私,IP 为正确的。 '‘’

请求代码:

def main():
    Log(exchange.GetAccount())
    Log(exchange.GetTicker())

**响应结果: **

2021-09-04 00:00:00		错误	品种订阅失败 ETH_USDT_OKEX
2021-09-04 00:00:00		信息	{'Balance': 10000.0, 'FrozenBalance': 0.0, 'Stocks': 3.0, 'FrozenStocks': 0.0}

接口响应结果:

{"schema":["time","open","high","low","close","vol"],"data":[[1633276800000,3404240000,3487650000,3271000000,3322460000,651045368230523],[1633363200000,3322090000,3473950000,3310220000,3418410000,542846992534053],[1633449600000,3418570000,3630740000,3341560000,3613450000,983445094291440],[1633536000000,3612710000,3641660000,3472000000,3585080000,684538257703793],[1633622400000,3585080000,3670200000,3545340000,3620480000,564951393418883],[1633708800000,3620110000,3646720000,3533330000,3600010000,389192127575613],[1633795200000,3600010000,3609090000,3482560000,3557440000,451505089887205],[1633881600000,3557440000,3621580000,3371420000,3593560000,662805336135916],[1633968000000,3593380000,3601370000,3403800000,3505370000,635862976758461],[1634054400000,3505090000,3532240000,3412060000,3485010000,440569625792859],[1634140800000,3485510000,3818450000,3476320000,3808010000,763274554717094],[1634227200000,3808010000,3860000000,3734410000,3790930000,605280070311598],[1634313600000,3790850000,3970000000,3788440000,3907290000,583565933228981],[1634400000000,3907290000,3919280000,3758390000,3788200000,435941894673365],[1634486400000,3788200000,3893810000,3640360000,3760600000,718030641094620],[1634572800000,3760700000,3862990000,3695580000,3774690000,465370040685930],[1634918400000,3966450000,4097350000,3890000000,4086110000,640319909991479],[1635004800000,4086110000,4186000000,3983740000,3999700000,556350486153852],[1635091200000,3999690000,4212000000,3961690000,4209880000,469628800899727],[1635177600000,4209890000,4257890000,4133010000,4186820000,374507391996595],[1635264000000,4186820000,4313000000,3932060000,3993590000,1290044162352029],[1636819200000,4679910000,4701990000,4567990000,4583990000,278347848524744],[1636905600000,4583990000,4768570000,4515000000,4648990000,524983830693040],[1636992000000,4648990000,4659990000,4105260000,4286090000,1177163056441276],[1637078400000,4285780000,4330180000,4063410000,4174190000,703326277035765]]}

疑问描述: 当前接口按照 <外部源 API> 写完之后,直接调用接口没有问题,可以获取到数据。但通过回测接口获取不到,并且,数据接口没有接到任何请求,请问<外部源 API> 在使用时还有哪些条件吗?


More

gaoyaxing24 一、 http://171.???.???.176:8000 访问有数据应答, 路径为: http://171.???.???.176:8000/data 二、 因为做过测试,参考只为拿出来好理解,试过: 1. BTC_USDT 2. ETH_USDT A. HUOBI B. OKEX C. 币安 D. BITFINEX 将数字与字母组合全部尝试过,粘帖出来的只是因为保存过。全是同样的结果。 关键点在于不管如何请求,都没有响应到服务器上。

小小梦 http://171.???.???.176:8000 这个地址在本地浏览器 访问一下, 看有没有数据应答。 另外,这里显示 : 品种订阅失败 ETH_USDT_OKEX 是OKEX 配置里怎么是 火币 ?exchanges: [{"eid":"Huobi","currency":"

小小梦 刷新页面,先配置好自定义数据源地址: http://171.???.???.176:8000/data , 然后再添加交易所对象。