alpaca-broker-sse-events

Manages and replays Server-Sent Event streams from the Alpaca Broker API.

108|11|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/alpacahq/alpaca-skills --skill alpaca-broker-sse-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alpaca-broker-sse-events
Source: https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/sse-events
Command: npx skills add https://github.com/alpacahq/alpaca-skills --skill alpaca-broker-sse-events

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill enables reliable consumption of Alpaca Broker API real-time event streams using Server-Sent Events (SSE), solving the challenges of real-time event monitoring, processing, and maintaining state in Alpaca brokerage applications.

Core Features & Use Cases

  • Real-Time Event Consumption: Monitor brokerage lifecycle events such as account status, journal entries, funding transfers, trade updates, and non-trade activities in real-time.
  • Connection & Auth: Securely handle connection management and authentication for SSE events over HTTP Basic auth.
  • Replay Cursor Management: Implement replay cursors to recover and replay missed events upon reconnect, ensuring data integrity and avoiding duplicate processing.
  • Error Handling: Include robust error handling with reconnection logic and heartbeat detection for reliability in a production environment.

Quick Start

Set up this Skill in your brokerage application to consume and process real-time events using SSE for the Alpaca Broker API.

Frequently Asked Questions about alpaca-broker-sse-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consume real-time SSE event streams from the Alpaca Broker API?

You consume real-time SSE event streams from the Alpaca Broker API by managing HTTP Basic auth connections and processing server-sent events directly. This handles brokerage lifecycle events like account status updates, trade updates, and funding transfers reliably.

What is the best way to handle reconnections and avoid duplicate events in an SSE stream?

Handling reconnections and avoiding duplicate events in an SSE stream requires implementing replay cursors. Replay cursors recover and replay missed events upon reconnecting, ensuring data integrity and preventing duplicate processing of brokerage lifecycle updates.

Does the Alpaca Broker API support heartbeat detection for SSE connections?

Yes, the Alpaca Broker API SSE streams support heartbeat detection. Robust error handling logic uses heartbeat detection alongside reconnection strategies to maintain reliable real-time event monitoring in production environments.

Can I monitor trade updates and funding transfers in real-time using Alpaca brokerage SSE events?

Yes, you can monitor trade updates and funding transfers in real-time using Alpaca brokerage SSE events. Real-time event consumption tracks brokerage lifecycle events including account status, journal entries, trade updates, and non-trade activities.

Why do my Alpaca Broker API event streams drop messages during network interruptions?

Alpaca Broker API event streams drop messages during network interruptions because standard SSE connections lack built-in state management. Implementing replay cursor management recovers missed events upon reconnect, ensuring continuous data integrity.

Do I need HTTP Basic auth to connect to Alpaca Broker API SSE streams?

Yes, you need HTTP Basic auth to connect to Alpaca Broker API SSE streams. Secure connection management and authentication over HTTP Basic auth is required to consume and process real-time brokerage events reliably.