资源加载中... loading...

连接币安的现货userDataStream获取listenKey出错

Author: ktrader, Created: 2021-05-11 13:47:06, Updated:

python 代码: exchange.IO(’api’, ‘POST’, ‘/api/v3/userDataStream’) 错误: Futures_OP 4: 400: {“code”:-1101,“msg”:“Too many parameters; expected ‘0’ and received ‘2’.”}


More

ktrader 解决了 if not self.is_spot: self.exchange.IO('api', 'PUT', self.listenKeyUrl) else: requests.put(self.spot_url + self.listenKeyUrl, headers= {'X-MBX-APIKEY': self.APIKEY}, timeout=3)

小草 类似于:HttpQuery('https://fapi.binance.com/fapi/v1/listenKey', {method: 'POST',data: ''}, null, 'X-MBX-APIKEY:' + APIKEY)

ktrader exchange.IO获取永续的没问题啊, 为什么现货必须用这种方式