alpaca-broker-sse-events

alpaca-broker-sse-events is a skill for Claude Code, Codex from alpacahq/alpaca-skills. It costs 93 tokens per session (2,377 once invoked), scanned A, original, Apache-2.0.

Instructions for receiving real-time account and transaction updates from Alpaca Broker through Server-Sent Events, a long-lived HTTP connection that sends events as they happen.

In plain words
What is it for?
Use it to process account-status, journal, funding-transfer, trade, and other brokerage activity events.
Why use it?
It provides a way to catch up after disconnects and handle reconnections, ordering, duplicate events, and missed updates more reliably than basic polling.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to process account-status, journal, funding-transfer, trade, and other brokerage activity events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alpacahq/alpaca-skills/sse-events
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alpacahq/alpaca-skills --skill sse-events
Clone the repo
git clone --depth 1 https://github.com/alpacahq/alpaca-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for alpaca-broker-sse-events

README.md
[![agentmods](https://agentmods.dev/badge/skills/alpacahq/alpaca-skills/sse-events/github.svg)](https://agentmods.dev/skills/alpacahq/alpaca-skills/sse-events)
Your own site
<a href="https://agentmods.dev/skills/alpacahq/alpaca-skills/sse-events"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-skills/sse-events/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alpaca-broker-sse-events

Your own site · 80×15
<a href="https://agentmods.dev/skills/alpacahq/alpaca-skills/sse-events"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-skills/sse-events.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.02377
Opus 5 $0.00046 $0.01189
Sonnet 5 $0.00019 $0.00475
Haiku 4.5 $0.00009 $0.00238

Measured 12d ago against content hash d1d8b6f139f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

alpaca-broker-sse-events scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/broker-api/sse-events/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 (SUBMITTEDACTIVE, ACTION_REQUIRED, REJECTED), plus kyc_results, account_blocked, trading_blocked, cash_interest, options
Journal status GET /v2/events/journals/status JNLC/JNLS lifecycle (queuedexecuted, correct…)
Funding/transfer status GET /v2/events/funding/status Unified: Transfer, BankRelationship, WireBank, FundingWallet entities (switch on entity_type)
Trade updates GET /v2/events/trades Order events in the event field: new, fill, partial_fill, canceled, rejected, held, trade_bust, trade_correct… (richer than order status)
Non-trade activities GET /v1/events/nta Dividends, interest, fees, splits, ACATs, cash disbursements. entry_type e.g. JNLC/FEE/INT/DIVNRA/CSD; statusexecuted/correct/canceled

Read the full file on GitHub · 108 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 108 lines · 93 tokens per session scan A d1d8b6f139f9

Subscribe to this mod's changes

alpaca-broker-sse-events is a skill published in the GitHub repository alpacahq/alpaca-skills (147 stars, last pushed 4d ago), licensed Apache-2.0. It adds 93 tokens to every session and 2,377 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.