Skip to main content
The Trading API serves three WebSocket streams: live quotes, order book depth, and priority fee estimates.

Connection

Find the WebSocket base URL on the Endpoints page, then append a stream path from the table below.

Streams

Each stream is a path on the Trading API WebSocket host:

Market Data Streams

DFlow serves live market data over two WebSocket streams on the Trading API. Subscribe to the pairs you want and read updates each slot. See Endpoints for the WebSocket URLs and access details.

Connecting

As a security best practice, keep your DFlow API key on the backend, not in browser code where anyone can read it. Stream through a backend proxy that holds the key, connects to DFlow, and relays messages to the browser. In production, access to the quote and book streams is granted per API key: a key that works for /order is not automatically allowed on the streams. Reach out to the team to request stream access on your key.

Choosing a Stream

Use the quote stream for price displays, pre-trade pricing, and watching many pairs at once. Use the book stream when you need depth: order book visualizations, depth charts, and sizing larger trades against available liquidity.

Quote Stream

Stream top-of-book bid and ask for token pairs

Book Stream

Stream ten levels of order book depth

Priority Fees Stream

Stream priority fee estimates without polling