Closed StephanAkkerman closed 4 months ago
Websocket only it seems
Example code:
#!/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()
disabled from config for now
Preferably we use a method for getting all the data at once instead of a websocket
image for reference
Could maybe scrape: https://coinalyze.net/bitcoin/liquidations/ but seems hard
Could use https://github.com/aoki-h-jp/binance-bulk-downloader for historical liquidation data of daily bitcoin only and make it a separate repo
Or can download it from: https://data.binance.vision/?prefix=data/futures/cm/daily/liquidationSnapshot/BTCUSD_PERP/
coinglass uses 6 months of data, not clear if only cm / um data or both
There seems to be something wrong with the liquidation data of BTCUSD_PERP...
Implemented in https://github.com/StephanAkkerman/liquidations-chart
Coinglass removed their free API 👎 Now we will use Binance instead, because we are not paying 💸