Query open orders with websocket and python connector

I am not able to query the orders and open positions through a websocket for U futures. I understand that the sdk (python connector) allows it, but I can’t find examples that do it.

Yes, I can consult them through RESTApi, but it is having a lot of delay and from the forum they recommended me to try the websocket.

Would someone have an example to share, thanks!

Hi mate,

All information about orders, positions, balance updates, etc. are sent via the User Data Stream. To receive information about your orders when they are placed, partially filled/filled, cancelled you need to listen for ORDER_TRADE_UPDATE events

You can’t directly query a specific order via the websocket for Futures. That’s what the REST API is for.

@jonte Thank you very much for answering. I tell you that I usually do it from the REST API, but in the case of the orders it is taking a long time to update the placed orders. Really a lot, sometimes 45 minutes or more. In the Binance Dev telegram, they recommended me to make the query through the websocket, but I couldn’t find a way to do it. In the documents it seemed to me that it could be done, but I really couldn’t do work.

Look at this link in the docs

https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data

Hi @Ramiro_Deploy,
if you notice on the Change log of Binance API Documentation, the Websocket API is available for Spot only at the moment.

Telegram’s suggestion of websocket is the websocket stream which is different, you can’t place/query orders, only receive ongoing changes in the market or account, this is available for futures and spot.

@aisling2 Ah ok, thanks for the clarification. I asked it to be sure on Telegram and they sent me to read the docs. and since in the docs it lists websocket Api for futures, I assumed it would work. but surely for this reason that you raise, I could not achieve it. the taking of events it is works for me. Do you know anything about the problem that I have been raising about updating data at the endpoint of futures u query orders? thank you!

since in the docs it lists websocket Api for futures
Can you point me to where you saw this, please?

Do you know anything about the problem that I have been raising about updating data at the endpoint of futures u query orders?
Sorry I don’t. If you want, you can re-comment in the post you’ve shared about this issue so that it’s back to top to bring more awareness. :slight_smile:

@aisling2
since in the docs it lists websocket Api for futures. Can you point me to where you saw this, please?

I’m not really finding it, surely I was wrong then.

Do you know anything about the problem that I have been raising about updating data at the endpoint of futures u query orders? Sorry I don’t. If you want, you can re-comment in the post you’ve shared about this issue so that it’s back to top to bring more awareness.

I have not gotten answers on the subject, neither in the forum nor in the telegram. On Telegram I read at least two more comments from people who had the same problem.

I leave the post in case you want to see it.