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.
market_stats is the only channel in the request, omitting symbols or sending an empty array also subscribes to all symbols:
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
symbolssupports a single symbol, multiple symbols, or wildcard"*".- The
daily_volumesanddaily_volumes_notionalnames 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_statsignoresintervalsandsig_figs; it always uses the default subscription filter.