alpaca-broker-sse-events
Consume Alpaca Broker API real-time event streams over Server-Sent Events (SSE) — account status, journal, transfer/funding, trade, and non-trade-activity events — reliably. Covers connection, auth, replay cursors (since/since_id), heartbeats, reconnection/backoff, ordering, and idempotent processing. Use when building an event consumer for Alpaca lifecycle events in any language.
npx skills add alpacahq/alpaca-skills --skill sse-events --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Alpaca Broker API — Real-Time Events (SSE) Alpaca pushes brokerage lifecycle events over **Server-Sent Events**: a long-lived HTTP GET that streams `text/event-stream`. This is *not* the market-data WebSocket (`alpaca-broker-market-data`) — different transport, different auth, different reliability model. > Read `alpaca-broker-integration` first. SSE uses the **Broker API host + HTTP Basic auth** (same credential as Broker REST). ## Reference - Guide: `https://docs.alpaca.markets/docs/sse-events` - Live: `alpaca-docs` MCP → `search` "SSE Events", then `fetch us/sse-events` ## 1. Why SSE (and why it's simpler than it looks) SSE is plain HTTP. You don't need a special client: open a GET, keep the connection open, and read the body line-by-line. Each event is a `data:` line containing a JSON object. It is **replayable** — you can ask for events from a point in the past and seamlessly catch up to live, which makes it far better than naive polling for lifecycle state. ## 2. Event streams | Stream | Path | Carries | |--------|------|---------| | Account status | `GET /v1/events/accounts/status` | Account-property changes: `status`/`crypto_status` (`SUBMITTED`→`ACTIVE`, `ACTION_REQUIRED
- Reference
- 1. Why SSE (and why it's simpler than it looks)
- 2. Event streams
- 3. Connection
- 4. Replay cursors — the feature that prevents data loss
- 5. Ordering caveat
- 6. Reliability patterns (hard-won)
- 7. Idempotent processing pipeline
- 8. Per-stream notes
- 9. SSE is necessary but not sufficient
What does the alpaca-broker-sse-events skill do?
Consume Alpaca Broker API real-time event streams over Server-Sent Events (SSE) — account status, journal, transfer/funding, trade, and non-trade-activity events — reliably. Covers connection, auth, replay cursors (since/since_id), heartbeats, reconnection/backoff, ordering, and idempotent processing. Use when building an event consumer for Alpaca lifecycle events in any language.
How do I install it?
Run `npx skills add alpacahq/alpaca-skills --skill sse-events --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From alpacahq/alpaca-skills, a repository with 106 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
