Closed bitog closed 1 year ago
Is it ['trade', 'forceOrder'], ['btcusdt']
?
Hi dducted!
I never used binance futures I only wrote the implementation and an other user tested the private streams.
But on binance futures docs I found this:
2019-11-29 New websocket streams:
@forceOrderfor liquidation order streams !forceOrder@arr for all market liquidation order streams
I guess <symbol>@forceOrderfor
should be working out of the box. Would be cool to get feedback from you.
!forceOrder@arr
needs to get implemented. I have time today so I would do the integration within the next hours. Would you be willing to test it before we push it to pypi?
Best regards, Oliver
Hm, I think it should be already working in 1.12.0!
Just try:
binance_websocket_api_manager.create_stream("forceOrder", "btcusdt")
binance_websocket_api_manager.create_stream("!forceOrder", "arr" )
Hi there,
Just saw your message now. Thanks for the reply. I did try what you asked, using the following code:
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager
from unicorn_fy.unicorn_fy import UnicornFy
binance_websocket_api_manager = BinanceWebSocketApiManager(exchange="binance.com")
binance_websocket_api_manager.create_stream("forceOrder", "btcusdt")
while True:
oldest_stream_data_from_stream_buffer = binance_websocket_api_manager.pop_stream_data_from_stream_buffer()
if oldest_stream_data_from_stream_buffer:
print(oldest_stream_data_from_stream_buffer)
But I am getting {"result":null,"id":1}
That's actually not a bad sign... https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/54
It seems to be connected! Oliver Zehentleitner
Not sure if null
and none
is the same but until not I haven't received any other data than {"result":null,"id":1}
. Maybe there just hasn't been any liquidation until now...
That's the point, you are connected. Result null is the confirmation of the subscription. If a liquidation happens, then you will receive the notification.
If you still need help, please reopen! thanks
Hi,
I tried something really similar to the code above `
import unicorn_binance_websocket_api
ubwa = unicorn_binance_websocket_api.BinanceWebSocketApiManager(exchange="binance.com") ubwa.create_stream("forceOrder", "btcusdt")
while True: oldest_data_from_stream_buffer = ubwa.pop_stream_data_from_stream_buffer() if oldest_data_from_stream_buffer: print(oldest_data_from_stream_buffer)
`
I am getting 1 line with {"result":null,"id":1} but after that nothing, no other print is executed. I left it run a long time without seeing anything Any Idea ?
Do you have a reference to the binance api documentation?
Hi
I was searching about binance liquidation and I found this thread. like @bitog , when I run my code (which do the same than the one above) I only get one line with {"result":null,"id":1} It look like jammed or something.
I found this I don't know if it is what your looking for https://binance-docs.github.io/apidocs/futures/en/#liquidation-order-streams https://github.com/Binance-docs/Binance_Futures_python/blob/master/binance_f/model/liquidationorder.py
Also if this can help I found this https://stackoverflow.com/questions/67509891/how-to-view-aggregated-liquidations-for-cryptocurrencies-from-binance The last post is working if it can help you make it work with your websocket
Hi,
I tried something really similar to the code above `
import unicorn_binance_websocket_api ubwa = unicorn_binance_websocket_api.BinanceWebSocketApiManager(exchange="binance.com") ubwa.create_stream("forceOrder", "btcusdt") while True: oldest_data_from_stream_buffer = ubwa.pop_stream_data_from_stream_buffer() if oldest_data_from_stream_buffer: print(oldest_data_from_stream_buffer)
`
I am getting 1 line with {"result":null,"id":1} but after that nothing, no other print is executed. I left it run a long time without seeing anything Any Idea ?
BinanceWebSocketApiManager(exchange="binance.com-futures")
Hi there,
I was just wondering what is the futures liquidation feed?
Thanks for your help!