Loading ...

币安websocket查询k线数据

Author: 5801972, Created: 2021-06-10 16:18:28, Updated:

有没有哪位大佬可以提供下币安websocket查询k线数据的代码? 我尝试去调用api接口,结果返回的k线数据不完整,没法转换成json 接口:wss://stream.binance.com:9443/ws/ethusdt_swap@continuousKline_1h 返回数据:{“e”:“depthUpdate”,“E”:1623312213713,“s”:“ETHUSDT”,“U”:8510952753,“u”:8510952961,“b”:[[“2540.99000000”,“13.09389000”],[“2540.93000000”,“0.00000000”],[“2540.92000000”,“0.00000000”],[“2540.91000000”,“0.00000000”],[“2540.80000000”,“0.00000000”],[“2540.79000000”,“0.00000000”],[“2540.77000000”,“2.00000000”],[“2540.70000000”,“8.33913000”],[“2540.69000000”,“0.00000000”],[“2540.68000000”,“4.50652000”],[“2540.64000000”,“0.00000000”],[“2540.63000000”,“8.25414000”],[“2540.62000000”,“0.00000000”],[“2540.61000000”,“0.00000000”],[“2540.60000000”,“15.29662000”],[“2540.59000000”,“0.00000000”],[“2540.56000000”,“1.00000000”],[“2540.52000000”,“0.00000000”],[“2540.41000000”,“0.00000000”],[“2540.40000000”,“0.00000000”],[“2540.34000000”,“0.78701000”],[“2540.33000000”,“6.05042000”],[“2540.32000000”,“0.00000000”],[“2540.28000000”,“0.06000000”],[“2540.24000000”,“3.00000000”],[“2540.23000000”,“1.45969000”],[“2540.02000000”,“0.00000000”],[“2539.96000000”,“0.00000000”],[“2539.95000000”,“0.78701000”],[“2539.92000000”,“0.75000000”],[“2539.91000000”,“0.00000000”],[“2539.86000000”,“3.45921000”],[“2539.78000000”,“1.50000000”],[“2539.75000000”,“0.57789000”],[“2539.57000000”,“0.97362000”],[“2539.54000000”,“0.40000000”],[“2539.52000000”,“11.83766000”],[“2539.50000000”,“0.00000000”],[“2539.39000000”,“0.00000000”],[“2539.26000000”,“0.50000000”],[“2539.25000000”,“2.42350000”],[“2539.18000000”,“0.00000000”],[“2539.17000000”,“0.00000000”],[“2539.06000000”,“0.62210000”],[“2538.97000000”,“0.00000000”],[“2538.82000000”,“0.00000000”],[“2538.24000000”,“0.00000000”],[“2537.89000000”,“0.82119000”],[“2536.29000000”,“0.00000000”],[“2535.95000000”,“0.00000000”],[“2535.90000000”,“2.40000000”],[“2535.12000000”,“0.00000000”],[“2535.00000000”,“38.23580000”],[“2534.65000000”,“2.01999000”],[“2534.56000000”,“0.00000000”],[“2531.97000000”,“0.00000000”],[“2531.84000000”,“0.66348000”],[“2531.68000000”,“0.15783000”],[“2530.98000000”,“0.15788000”],[“2526.15000000”,“3.52033000”],[“2525.57000000”,“0.00000000”],[“2514.33000000”,“0.07950000”]],“a”:[[“2540.99000000”,“0.00000000”]

img img


More

金十量化 请问你说的置顶教程指的是哪个?能把链接发给我么

小草 参考置顶教程,不要用这种方式调用wss,最好使用事件驱动型