> ## Documentation Index
> Fetch the complete documentation index at: https://pond.dflow.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Priority Fees Stream

> Stream Trading API priority fee estimates over WebSocket

Use this stream to receive real-time priority fee estimate updates.

<Info>
  No subscribe message is required. Connect to the endpoint and start reading
  messages.
</Info>

## Connection

See the [Websockets Overview](/resources/trading-api/websockets/overview#connection)
for endpoint details.

## Message Format

Each message is a JSON object with the same shape as
[`GET /priority-fees`](/resources/trading-api/priority-fees/priority-fees):

```json theme={null}
{
  "mediumMicroLamports": 100000,
  "highMicroLamports": 150000,
  "veryHighMicroLamports": 220000
}
```

## Example (TypeScript)

```typescript theme={null}
import WebSocket from "ws";

const WS_URL = "wss://dev-quote-api.dflow.net/priority-fees/stream";
const ws = new WebSocket(WS_URL);

ws.onopen = () => {
  console.log("Connected — waiting for priority fee updates");
};

ws.onmessage = (event) => {
  const fees = JSON.parse(event.data.toString());
  console.log("Priority fees (micro-lamports/CU):", fees);
};
```

## Related

* [Websockets Overview](/resources/trading-api/websockets/overview)
* [GET /priority-fees](/resources/trading-api/priority-fees/priority-fees)


## OpenAPI

````yaml GET /priority-fees/stream
openapi: 3.1.0
info:
  title: DFlow Aggregator
  description: DFlow Aggregator API
  license:
    name: BUSL-1.1
  version: 0.1.0
servers:
  - url: https://quote-api.dflow.net
security:
  - api_key: []
tags:
  - name: order
    description: Order API endpoints
  - name: swap
    description: Swap API endpoints
  - name: intent
    description: Intent trading endpoints
  - name: prediction_market
    description: Prediction market endpoints
  - name: venues
    description: Venue endpoints
  - name: tokens
    description: Token endpoints
paths:
  /priority-fees/stream:
    get:
      tags:
        - swap
      summary: Streams priority fee estimate updates over a WebSocket connection
      operationId: priority_fee_stream_handler
      responses:
        '101':
          description: WebSocket upgrade
components:
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Contact hello@dflow.net to obtain an API
        key.

````