Reference Data returns a list of all available symbols and their reference data.
This is also available via REST at https://http.qfex.com/v4/perpetualMarkets.

How it works

Connect to the public websocket:
  • URL: wss://mds.qfex.com
Then send a subscribe message:
{"type": "subscribe", "channels": ["refdata"], "symbols": ["AAPL-USD", "SP500-USD"]}
You can also subscribe to all symbols with a wildcard:
{"type": "subscribe", "channels": ["refdata"], "symbols": ["*"]}
You’ll receive streaming messages containing reference data snapshots/updates for the requested symbols.

Sample Code

# Python (websocket-client)
# pip install websocket-client
import json
import websocket

def on_open(ws):
    sub = {
        "type": "subscribe",
        "channels": ["refdata"],
        "symbols": ["AAPL-USD", "SP500-USD"]  # or ["*"]
    }
    ws.send(json.dumps(sub))

def on_message(ws, message):
    data = json.loads(message)
    print("RefData message:", json.dumps(data, indent=2))

def on_error(ws, error):
    print("Error:", error)

def on_close(ws, close_status_code, close_msg):
    print("Closed:", close_status_code, close_msg)

if __name__ == "__main__":
    ws = websocket.WebSocketApp(
        "wss://mds.qfex.com",
        on_open=on_open,
        on_message=on_message,
        on_error=on_error,
        on_close=on_close,
    )
    ws.run_forever()

Example Response Shape

The websocket payloads mirror the REST fields. A single message may include one or more symbols.
{
  "type": "refdata",
  "data": [
    {
      "clobPairId": "4",
      "symbol": "GOOG-USD",
      "underlier_price": "154.16",
      "price_change_24h": "-2.1",
      "tick_size": "0.05",
      "lot_size": "0.001",
      "min_price": "112",
      "max_price": "209",
      "min_quantity": "0.001",
      "max_quantity": "100000000",
      "base_asset": "GOOG",
      "quote_asset": "USD",
      "margin_asset": "USD",
      "order_time_in_force": ["GTC", "IOC", "FOK"],
      "order_types": ["LIMIT", "MARKET", "ALO"],
      "market_hours": {
        "tz": "America/New_York",
        "monday": {"open": "04:00:00", "close": "20:00:00"},
        "tuesday": {"open": "04:00:00", "close": "20:00:00"},
        "wednesday": {"open": "04:00:00", "close": "20:00:00"},
        "thursday": {"open": "04:00:00", "close": "20:00:00"},
        "friday": {"open": "04:00:00", "close": "20:00:00"}
      }
    }
  ]
}

Unsubscribe (optional)

{"type":"unsubscribe","channels":["refdata"],"symbols":["AAPL-USD"]}

Notes
  • wss://mds.qfex.com is public—no API key required.
  • For private data and trading, use wss://trade.qfex.com and include api-key in the connection headers.
  • The symbols array accepts * to receive refdata for all symbols.