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

# Stream Available Liquidity Updates via SSE

> Opens a Server-Sent Events stream that pushes a **LiquidityEvent** whenever a pool's available liquidity changes and a **FeeEvent** whenever a route fee updates. Current fee and liquidity state is pushed immediately on a new connection. Liquidity events fire when a reservation is created, increased, or deleted; duration-only extensions do not trigger an event.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sprinter.tech/liquidity/protocol/{protocol}/events' \
    --header 'X-Auth-Token: YOUR_API_KEY'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get("https://api.sprinter.tech/liquidity/protocol/{protocol}/events", headers={"X-Auth-Token": "YOUR_API_KEY"})
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.sprinter.tech/liquidity/protocol/{protocol}/events",
    { headers: { "X-Auth-Token": "YOUR_API_KEY" } }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"net/http"
  )

  func main() {
  	req, _ := http.NewRequest("GET", "https://api.sprinter.tech/liquidity/protocol/{protocol}/events", nil)
  	req.Header.Set("X-Auth-Token", "YOUR_API_KEY")
  	resp, _ := http.DefaultClient.Do(req)
  	defer resp.Body.Close()
  	body, _ := io.ReadAll(resp.Body)
  	fmt.Println(string(body))
  }
  ```
</RequestExample>


## OpenAPI

````yaml get /liquidity/protocol/{protocol}/events
openapi: 3.0.0
info:
  contact: {}
  title: ''
  version: 0.0.1
servers:
  - url: https://api.sprinter.tech
    description: Production server
security: []
paths:
  /liquidity/protocol/{protocol}/events:
    get:
      tags:
        - Liquidity
      summary: Stream available liquidity updates via SSE
      description: >-
        Opens a Server-Sent Events stream that pushes a **LiquidityEvent**
        whenever a pool's available liquidity changes and a **FeeEvent**
        whenever a route fee updates. Current fee and liquidity state is pushed
        immediately on a new connection. Liquidity events fire when a
        reservation is created, increased, or deleted; duration-only extensions
        do not trigger an event.
      parameters:
        - description: Protocol to monitor the liquidity and fees for.
          name: protocol
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: SSE stream of FeeEvent and LiquidityEvent objects
          content:
            text/event-stream:
              schema:
                type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Auth-Token
      in: header

````