如何在少于10行的代码中将Websockets Stream用于Binance Exchange。



时间戳记:
0:20-什么是websocket
2:10-Node JS
3:08-NPM-节点程序包管理器
4:23-初始化Node JS。
6:25-安装Binance NPM
7:21-Websocket呼叫代码
9:21-运行代码
10:01-如何停止代码

概述:在本视频中,我解释了如何使用NodeJS将Websockets用于Binance API。

节点JS:https://nodejs.org/en/download/
币安(NPM):https://www.npmjs.com/package/binance
官方API:https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md。

18 comments
  1. Hi bro. Thanks for the amazing video. However I have a question.

    How can I access the latest price of a coin using websockets?

    The npm module which you used don't have that. What I have been trying to do is get the latest price of a coin which will update every second.

    The documentation of the npm module does not have that in websockets. But if we go down i can see the current price function but it redirects to the official API GitHub page.

    So is it possible to get the latest/current price using websockets?

Comments are closed.