Documentation Index
Fetch the complete documentation index at: https://docs.qfex.com/llms.txt
Use this file to discover all available pages before exploring further.
Subscribe to real-time open interest updates for symbols.
How it works
Connect to the public websocket:
Then send a subscribe message:
{
"type": "subscribe",
"channels": ["open_interest"],
"symbols": ["AAPL-USD"]
}
Sample Code
# Python (websocket-client)
import json
import websocket
def on_open(ws):
sub = {
"type": "subscribe",
"channels": ["open_interest"],
"symbols": ["AAPL-USD"]
}
ws.send(json.dumps(sub))
def on_message(ws, message):
print("Update:", message)
if __name__ == "__main__":
ws = websocket.WebSocketApp(
"wss://mds.qfex.com",
on_open=on_open,
on_message=on_message
)
ws.run_forever()
Example Response
{
"type": "open_interest",
"symbol": "AAPL-USD",
"open_interest": "1000000",
"time": "2025-05-08T20:52:48.000Z"
}