Some info about WebSocket

Hi,
I made a BOT in node.js that trades on Binance. I used Spot API and a long-polling technique to get prices.
Now I want convert to use WebSocket. I found many docs about but I’m a little confuse.
Is it possible to trade on Binance using WebSocket? Or is only possible to get only market data?

You can trade via the websocket. Please refer to the documentation here: Binance API Documentation

1 Like

Thanks. Which is the difference between Binance API Documentation (https://binance-docs.github.io/apidocs/websocket_api/en/#trading-requests) and Binance API Documentation https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams?

Well, one is simply for collecting/receiving market data (https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams) and the other is for directly interacting with to place orders, etc (https://binance-docs.github.io/apidocs/websocket_api/en/#trading-requests).

1 Like