---
title: "Real-Time Market Data Streaming over MQTT & WebSockets | ConnectMQ"
description: "Fan out live prices and quotes from your feed handler to web and mobile trading apps over MQTT and secure WebSockets, with the last price retained per symbol."
url: "https://connectmq.com/use-cases/real-time-market-data/"
language: "en"
---

Use case

# Live prices on every trading screen

Your feed handler publishes each price update once; every web, mobile and desktop client watching that symbol receives it over secure WebSockets. A user who opens the app sees the last price straight away, from a retained message.

[Try it free](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

No card required

Used in

-   [Financial Services](https://connectmq.com/industries/financial-services/)

Example message

PUBLISH md/fx/EURUSD/quote

```
{"bid":1.08412,"ask":1.08415,"ts":1761120000123}
```

QoS 1 · TLS 8883 · PUBACK

The problem

## Polling and home-grown socket servers don’t scale

Brokerage, crypto and fintech apps need prices to move on screen as the market moves. REST polling wastes bandwidth and still lags; a home-grown WebSocket server ends up re-implementing subscriptions, fan-out, reconnection and authentication — and needs on-call engineers when every user opens the app at market open.

## How it works

1.  1
    
    ### Normalise the feed
    
    Your feed handler takes quotes from the exchange, liquidity provider or market data vendor and turns them into one compact payload per symbol.
    
2.  2
    
    ### Publish once per symbol
    
    It publishes every update to a topic such as md/equities/AAPL/quote with the retain flag set, so the broker always holds the latest price for each symbol.
    
3.  3
    
    ### Clients subscribe to their watchlist
    
    Web and mobile apps connect over secure WebSockets and subscribe to the symbols on screen; a wildcard such as md/fx/+/quote covers a whole asset class.
    
4.  4
    
    ### The rest of your stack listens too
    
    Price-alert services, risk dashboards and back-office tools subscribe to the same topics; a shared subscription spreads the load across alert workers.
    

ConnectMQ

## What it needs from the broker

### Secure WebSockets for browsers

wss on port 8084 lets web apps speak MQTT straight from the browser, and native apps use TLS or WebSockets — no extra gateway in front of the broker.

### Retained last price

One retained message per symbol means a freshly opened screen shows the current price at once instead of waiting for the next tick.

### Read-only app users

Per-topic ACLs let app users subscribe to market data but never publish to it; only the feed handler’s credentials can write prices.

### QoS that fits the data

Ticks go out at QoS 0 — the next price replaces the last one — while order status and account notifications use QoS 1 so they are not lost.

## What you get

-   Prices that move on screen without polling
-   One publish reaches every subscribed client
-   An instant first price for every new session
-   No WebSocket fan-out server to maintain

Example topics

```
md/equities/{symbol}/quote      (retained)
md/fx/{pair}/quote              (retained)
md/crypto/{pair}/trade
users/{user-id}/orders
users/{user-id}/alerts
```

## Industries that run this use case

 [![](https://connectmq.com/images/industries/hero/financial-services.webp) Financial Services](https://connectmq.com/industries/financial-services/)

## Related solutions

[

### Connected Products & Smart Hardware

Smart devices you ship to your own customers

Learn more](https://connectmq.com/connected-products/)

## Frequently asked questions

Is MQTT fast enough for real-time market data?

For distributing prices to web, mobile and desktop apps, yes: MQTT pushes each update to subscribers as it arrives, with very little protocol overhead. It does not replace co-location or the low-latency links that matching engines and algorithmic trading rely on — use it for the last mile to people’s screens.

MQTT vs WebSocket for streaming stock prices?

They work together. WebSocket is the connection a browser can open; MQTT on top of it adds topics, wildcards, retained last values, QoS and authentication, so you don’t design your own message protocol and fan-out logic. ConnectMQ accepts MQTT over secure WebSockets out of the box.

How do I stop app users from publishing fake prices?

Give app users credentials that may only subscribe to the market data topics, and grant publish rights to the feed handler alone. Which users may see which exchange’s data stays in your entitlement system — it decides which credentials and topics each user gets.

## Build it on ConnectMQ

Start on the Free plan — no card required — connect your first devices today and upgrade when you go live.

[Get started](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

## More use cases

-   [Predictive Maintenance](https://connectmq.com/use-cases/predictive-maintenance/)
-   [Asset Performance Tracking](https://connectmq.com/use-cases/asset-performance-tracking/)
-   [Industrial Agentic AI Operations](https://connectmq.com/use-cases/industrial-agentic-ai/)
-   [Energy Management](https://connectmq.com/use-cases/energy-management/)
-   [Connected Vehicles](https://connectmq.com/use-cases/connected-vehicles/)
-   [EV Charging Management](https://connectmq.com/use-cases/ev-charging-management/)
-   [Fleet Management](https://connectmq.com/use-cases/fleet-management/)
-   [Remote Asset Monitoring](https://connectmq.com/use-cases/remote-asset-monitoring/)
-   [Tank Level Monitoring](https://connectmq.com/use-cases/tank-level-monitoring/)
-   [Smart Metering](https://connectmq.com/use-cases/smart-metering/)
-   [Solar & Wind Farm Monitoring](https://connectmq.com/use-cases/solar-wind-farm-monitoring/)
-   [Cleanroom & GMP Environmental Monitoring](https://connectmq.com/use-cases/cleanroom-environmental-monitoring/)
-   [Cold Chain Monitoring](https://connectmq.com/use-cases/cold-chain-monitoring/)
-   [Remote Patient Monitoring](https://connectmq.com/use-cases/remote-patient-monitoring/)
-   [Hospital Equipment Monitoring & Tracking](https://connectmq.com/use-cases/medical-equipment-tracking/)
-   [Real-Time Notifications](https://connectmq.com/use-cases/real-time-notifications/)
-   [Smart Store Operations](https://connectmq.com/use-cases/smart-store-operations/)
-   [ATM & POS Terminal Monitoring](https://connectmq.com/use-cases/atm-pos-terminal-monitoring/)
-   [Telecom Network Equipment Monitoring](https://connectmq.com/use-cases/network-equipment-monitoring/)
-   [IoT Platform for Operators](https://connectmq.com/use-cases/iot-platform-for-operators/)
-   [Agricultural Drones](https://connectmq.com/use-cases/agricultural-drones/)
-   [Greenhouse IoT Sensors](https://connectmq.com/use-cases/greenhouse-iot-sensors/)
-   [Data Center Monitoring](https://connectmq.com/data-centers/)
-   [Smart Irrigation](https://connectmq.com/smart-agriculture/)

## Articles

[All articles](https://connectmq.com/blog/)

Managed MQTT Cloud

### [How to Choose an IoT MQTT Broker: 12 Criteria and the Questions to Ask Your Vendor](https://connectmq.com/blog/how-to-choose-an-iot-mqtt-broker/)

A practical 12-point checklist for choosing an IoT MQTT broker, a table of questions to ask every vendor, and a five-minute hands-on test you can run against broker.connectmq.com.

September 21, 20269 min read

MQTT Fundamentals

### [MQTT QoS Levels Explained: QoS 0, 1 and 2 with Packet Flows and Examples](https://connectmq.com/blog/mqtt-qos-levels-explained/)

A practical guide to MQTT QoS: how QoS 0, 1 and 2 work on the wire, why the delivered QoS can be lower than you asked for, how sessions queue messages and which level to choose for each use case.

August 20, 20269 min read

MQTT Security

### [MQTT Security Best Practices: A 12-Point Checklist for IoT Teams](https://connectmq.com/blog/mqtt-security-best-practices/)

A hands-on MQTT security checklist covering TLS, credentials, client IDs, topic design, payload validation, rate limits and certificate checks, plus how ConnectMQ handles each point.

September 28, 202611 min read
