Websocket Stream and Send Order & SBE

Hi,

I noticed there’s a new support for SBE with certain endpoints, and I’m wondering if we can use SBE with WebSocket streams too ?

I tried to find details on this in the documentation and in the xml, but I didn’t see anything about it. I only see sbe for websocket api, and only for the “response” part.

So, I’ve got a couple of questions:

  1. Can we actually use SBE with WebSocket streams right now? If yes, I’m all ears on how to set it up correctly.
  2. If it’s not a thing yet, any idea if it’s on the roadmap? And maybe when we might see it?
  3. Same for sending request/raw order in binary with SBE, not in json.

Hey, Yes, you can use SBE with websocket streams. Here are some examples:

Requests are still in the form of URL query parameters or JSON.

Hey, Thank you for your answer. Do you use sbe for websocket stream ? Because I think there is nothing about this in the documentation.

I already read all the info in the SBE FAQ, SBE Sample, xml file etc. SBE is working for REST API and WebsocketAPI - but found nothing for Websocket Stream.

Also, I tried this command below from the sbe_sample modified for websocket stream endpoint, and it doesn’t work :

echo ‘{“id”:“1”,“method”:“SUBSCRIBE”,“params”:[btcusdt@bookTicker]}’ | ./tools/websocket_send2.py ‘wss://stream.binance.com:9443/ws/ethusdt@bookTicker?responseFormat=sbe&sbeSchemaId=1&sbeSchemaVersion=0’

Hey,
You are right, websocket stream is not available yet.
There doesn’t seem to be a roadmap available, but it might become available in the future.