Hello, can anyone please explain me the purpose of wss://ws-api.binance.com:443/ws-api/v3 ?
I saw in the documentation that it is a SPOT WEBSOCKET API, but I didn’t understand if it is more an API or a WEBSOCKET!
I checked it and created some orders (like REST API does), but I wonder if it can access the market data stream (like wss://stream.binance.com:9443/ws/ does)…
Also, is it possible to authenticate to it using a method, so that a permanent connection is established (keep alive)?
For the Spot Websocket API, you could make a websocket connection, then send messages over it to implement all your needs:
place order
query order
delete order
query account info
etc
You definitely could send all above requests over classic RESTful endpoints, but the Websocket API is just another channel that you could interact with Binance API server.
Is it possible to keep this connection alive?
I am asking this, because when I send an order I get :
2023-10-19 00:09:10.000762 > CLOSE 1000 (OK) [2 bytes]
2023-10-19 00:09:10.000762 < CLOSE 1000 (OK) [2 bytes]
I do not have an idea if this a “normal” behavior.
Dino, I have an inquiry regarding the behavior of the Spot Websocket API (I do not want to create a new post), When I execute a trade, the sequence is as follows:
The connection is established.
The trade order is dispatched.
The websocket connection terminates (the message indicates a code 1000).
My question is: Is it standard for the websocket (Spot Websocket API) to close after completing a trade?
Is it possible to keep the connection with the Spot Websocket API open even after sending an order? If so, how to do it?