vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 1
声望: 0

异常日志:
20:53:38.833,Websocket API连接成功,OKEXS
20:53:38.787,Websocket API连接断开,OKEXS
20:53:38.787,触发异常>,状态码:<class 'ValueError'>,信息:too many values to unpack (expected 3),OKEXS

行情订阅的时候就会一直报这个错误,并且没有交易量和买卖盘数据,我用的是香港的服务器

description

description

Member
avatar
加入于:
帖子: 27
声望: 0

我的也存在同样问题

Member
avatar
加入于:
帖子: 3
声望: 0

这个永续合约的返回数据改了
{
"table": "swap/depth5",
"data": [{
"asks": [
["5621.7", "58", "0", "2"],
["5621.8", "125", "0", "5"],
["5622", "84", "0", "2"],
["5622.5", "6", "0", "1"],
["5623", "1", "0", "1"]
],
"bids": [
["5621.3", "287", "0", "8"],
["5621.2", "41", "0", "1"],
["5621.1", "2", "0", "1"],
["5621", "26", "0", "2"],
["5620.9", "640", "0", "1"]
],
"instrument_id": "BTC-USD-SWAP",
"timestamp": "2019-05-06T07:03:33.048Z"
}]
}

等修复吧

Member
avatar
加入于:
帖子: 3
声望: 0

或者自己手动改一下

okexs_gateway: 755行
            price, volume, _= bids[n] => price, volume, _, _= bids[n]

okexs_gateway: 760行
            price, volume, _ = asks[n] => price, volume, _, _ = asks[n]
Member
avatar
加入于:
帖子: 2364
声望: 148

是的,这个问题稍后会修复的

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号