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.
Access to the quote and book streams is gated. Reach out to the team to request access.
Quotes and book levels are approximations. DFlow computes them at runtime
from current routes, so they may differ from the quote you receive at order
time. Treat them as a live read on the market, not a guaranteed execution
price.
Quote Stream
The quote stream returns a live bid and ask for any pair of token mints, across
direct and one-hop routes. New quotes stream out as the underlying liquidity
moves, so you read prices as they change without polling.
DFlow builds each quote by routing a $10 USDC equivalent trade through the best
path in each direction, so the bid and ask are the rates that trade would
execute at.
For the full message format and parameters, see the Quote Stream API. The Stream Top-of-Book Quotes recipe shows how to connect and read updates in code.
Book Stream
The book stream gives you ten levels of order book depth per side, with the mid
price and tick size. Levels are cumulative from the spot outward, so each level
carries the total size available up to that price. The book stream covers direct
routes only.
For the full message format and parameters, see the Book Stream API. The Stream Order Book Depth recipe shows how to connect and render depth in code.
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.