Skip to main content
Subscribe to consolidated market statistics for one symbol or all symbols. The market_stats stream combines the latest BBO, mark price, open interest, funding rate, and rolling 24-hour traded quantity and notional volume into one message. On subscribe, MDS sends a subscribed acknowledgement, followed by a snapshot when data is available. Named-symbol subscriptions refresh once per second. Wildcard subscriptions (symbols: ["*"]) now refresh every 10 seconds. Each message is a complete snapshot for the requested symbol or symbols, so clients can replace the previous snapshot rather than applying a delta.

How it works

Connect to the public websocket:
  • URL: wss://mds.qfex.com
  • Authentication: not required.
Then send a subscribe message:
Or subscribe to all symbols with a wildcard:
When market_stats is the only channel in the request, omitting symbols or sending an empty array also subscribes to all symbols:
For multiple named symbols, MDS sends a separate snapshot for each symbol. A wildcard subscription receives one snapshot containing all available symbols, with the top-level symbol set to "*".

Sample code

Example response

This illustrative wildcard snapshot contains one symbol:

Response fields

The six component fields are always arrays and can be empty when a latest value is unavailable. Join entries by symbol; the arrays may contain different sets of symbols. Prices, quantities, open interest, volumes, and funding rates are serialized as decimal strings.

Unsubscribe (optional)


Notes
  • symbols supports a single symbol, multiple symbols, or wildcard "*".
  • The daily_volumes and daily_volumes_notional names are retained for compatibility. Both measure the previous 24 hours and have no fixed daily reset. They can decrease as older trades leave the window.
  • Snapshots are sent only when at least one component has data. Component timestamps can be older than the snapshot timestamp.
  • market_stats ignores intervals and sig_figs; it always uses the default subscription filter.