Closed avatar-lavventura closed 2 years ago
Fetching from self.socket = "wss://fstream.binance.com/ws/!forceOrder@arr"
solved my issue.
#!/usr/bin/env python3
import websocket
def on_message(ws, msg):
print(msg)
def on_close():
print("closed")
socket = "wss://fstream.binance.com/ws/!forceOrder@arr"
ws = websocket.WebSocketApp(socket, on_message=on_message, on_close=on_close)
ws.run_forever()
Hi there, I was looking at your code and see that this only returns real-time liquidations. Do you also know if historical data can be retrieved? Can't find it anywhere. Thanks!
Hi ! Have you found a way to get that data ? Thanks for your help
@Fabio007 @QuantFlows
Hi there, I was looking at your code and see that this only returns real-time liquidations. Do you also know if historical data can be retrieved? Can't find it anywhere. Thanks!
It took some time for me to find a source, but I discovered that Binance keeps track of this historical data and can easily be accessed on https://data.binance.vision/. Here you can see the historical liquidation data, for instance for USD-M BTC-USD perp is this URL: https://data.binance.vision/?prefix=data/futures/cm/daily/liquidationSnapshot/BTCUSD_PERP/. You can also find other useful historical data on that website.
I also found this repo https://github.com/aoki-h-jp/binance-bulk-downloader that implemented a downloader for it.
@Fabio007 @QuantFlows
Hi there, I was looking at your code and see that this only returns real-time liquidations. Do you also know if historical data can be retrieved? Can't find it anywhere. Thanks!
It took some time for me to find a source, but I discovered that Binance keeps track of this historical data and can easily be accessed on https://data.binance.vision/. Here you can see the historical liquidation data, for instance for USD-M BTC-USD perp is this URL: https://data.binance.vision/?prefix=data/futures/cm/daily/liquidationSnapshot/BTCUSD_PERP/. You can also find other useful historical data on that website.
I also found this repo https://github.com/aoki-h-jp/binance-bulk-downloader that implemented a downloader for it.
Thanks
On these sites (https://coinalyze.net/ethereum-classic/liquidations/, BTC/USDT), I am able to add following indications into graph [
Liquidations
,Long Liquidations
,Short Liquidations
,Aggregated Liquidations COIN-margined Contracts
,Aggregated Liquidations STABLECOIN-margined Contracts
], which make me think that its possible to fetch liquidations of all the pairs inBinance/Futures
.=> Is it possible to obtain data for liquidations (all the users) in cryptocurrencies using
python-binance
?I have tried following code, which returns empty list as
[]
:Any help would be appreciated.
Related: