Agent skill · Security

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.

alpacahqgithub.com/alpacahqGitHub ↗
claude-codecodexcursorApache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill sse-events --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/broker-api/sse-events/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 106
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Reference
  2. 1. Why SSE (and why it's simpler than it looks)
  3. 2. Event streams
  4. 3. Connection
  5. 4. Replay cursors — the feature that prevents data loss
  6. 5. Ordering caveat
  7. 6. Reliability patterns (hard-won)
  8. 7. Idempotent processing pipeline
  9. 8. Per-stream notes
  10. 9. SSE is necessary but not sufficient
Ships with 1 file
  • reference.md
More from alpaca-skills
All skills →
About this skill
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.

Keep going