How it works
Connect to the public websocket:- URL: wss://mds.qfex.com
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{
"type": "subscribe",
"channels": ["open_interest"],
"symbols": ["AAPL-USD"]
}
# 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()
// Node.js (ws)
import WebSocket from "ws";
const ws = new WebSocket("wss://mds.qfex.com");
ws.on("open", () => {
const sub = {
type: "subscribe",
channels: ["open_interest"],
symbols: ["AAPL-USD"]
};
ws.send(JSON.stringify(sub));
});
ws.on("message", (msg) => {
console.log("Update:", msg.toString());
});
{
"type": "open_interest",
"symbol": "AAPL-USD",
"open_interest": "1000000",
"time": "2025-05-08T20:52:48.000Z"
}