如何在少於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.