Creator · alpacahq
Last updated · Sep 1, 2026
Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds,
Creator · alpacahq
Last updated · Sep 1, 2026
Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds,
Creator · alpacahq
Last updated · Sep 1, 2026
Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds,
Creator · alpacahq
Last updated · Sep 1, 2026
Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds,
Sandbox only
Install targets
Codex install prompt
Install the "alpaca-broker-market-data" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/market-data. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"alpacahq-alpaca-broker-market-data","task":"Install alpaca-broker-market-data","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Maintenance
fresh
11d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
112
67/100 Quality · 71/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
112 GitHub stars
Repo activity
112 stars, 11 forks
Maintenance
11d since push
License
Apache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
Agent should check
Copy prompt
Task: Use alpaca-broker-market-data in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
LLM text format
/api/skills/alpacahq-alpaca-broker-market-data/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-market-data&limit=3
Agent prompt
Use alpaca-broker-market-data for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/alpacahq-alpaca-broker-market-data
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-market-data?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-market-data
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-market-data%20in%20an%20agent%20workflow&limit=3
Agent fit
Finance and quant
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Finance and quant
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO112 GitHub stars
Stars/forks activity
CHECK112 stars, 11 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Analyze markets
I need my agent to analyze markets, financial data, filings, portfolios, and quant strategies.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: alpaca-broker-market-data description: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. ---
# Alpaca Market Data API — Stocks (REST + WebSocket)
Real-time and historical US equity data. Unlike the Broker endpoints, market data lives on **its own host with its own auth**, and the real-time feed is **WebSocket**, not SSE.
> Read `alpaca-broker-integration` first. Assets/clock/calendar live on the **Trading API** host; everything else here is the **Market Data API** host.
## Reference - Guides: `https://docs.alpaca.markets/docs/historical-stock-data`, `https://docs.alpaca.markets/docs/streaming-market-data` - Live schema: `alpaca-docs` MCP → `list-endpoints` title `"Market Data API"`
## 0. Hosts & auth
| Surface | Host | |---------|------| | Market data REST | `https://data.alpaca.markets` (sandbox `data.sandbox.alpaca.markets`) | | Market data WebSocket | `wss://stream.data.alpaca.markets/{version}/{feed}` | | Assets / clock / calendar | `https://api.alpaca.markets` (Trading API) — paper: `paper-api.alpaca.markets` |
**Auth:** headers `APCA-API-KEY-ID` / `APCA-API-SECRET-KEY` (Broker partners may use Broker Basic auth in broker context).
## 1. REST endpoints
| Path | Purpose | |------|---------| | `GET /v2/stocks/snapshots?symbols=…` · `GET /v2/stocks/{symbol}/snapshot` | Snapshot (latest trade/quote + bars) | | `GET /v2/stocks/bars?symbols=…` · `GET /v2/stocks/{symbol}/bars` | Historical OHLCV bars | | `GET /v2/stocks/bars/latest` · `…/{symbol}/bars/latest` | Latest bar(s) | | `GET /v2/stocks/trades[/latest]` · `GET /v2/stocks/quotes[/latest]` | Historical / latest trades & quotes | | `GET /v2/stocks/auctions` | Opening/closing auctions | | `GET /v2/stocks/meta/conditions/{trade\|quote}` · `/meta/exchanges` | Code lookups | | `GET /v1beta1/news?symbols=…` | News (max `limit` 50) | | `GET /v1beta1/screener/stocks/most-actives` · `/screener/{stocks\|crypto}/movers` | Screeners | | `GET /v2/assets` *(Trading API host)* · `GET /v1/assets` *(Broker API host)* | Asset master / tradability | | `GET /v2/clock` · `GET /v2/calendar` *(Trading API host)* | Market hours |
> **Clock/calendar/assets paths are host-dependent — verified live against the sandbox:** > > | Path | Trading API host (`api.alpaca.markets`) | Broker API host (`broker-api.*`) | > |------|:--:|:--:| > | `/v1/clock` | — | **200** | > | `/v2/clock` | **200** | **200** | > | `/v1/calendar` | — | **200** | > | `/v2/calendar` | **200** | **404** | > | `/v1/assets` | — | **200** | > | `/v2/assets` | **200** | **404** | > > So: on the **Trading/Market-Data API host** use `/v2/clock`, `/v2/calendar`, `/v2/assets`. On the **Broker API host** use **`/v1/clock`**, **`/v1/calendar`**, **`/v1/assets`** (`/v1/clock` and `/v2/clock` both work there; `/v2/calendar` and `/v2/assets` 404). A Broker-API integration hitting `/v1/clock` is **correct**, not stale.
## 2. Bars — params
| Param | Notes | |-------|-------| | `timeframe` | `[1-59]Min`/`T`, `[1-23]Hour`/`H`, `1Day`/`D`, `1Week`/`W`, `[1,2,3,4,6,12]Month`/`M`. Case-sensitive. e.g. `1Min`, `5Min`, `1Hour`, `1Day` | | `start` / `end` | RFC3339 or `YYYY-MM-DD`, inclusive | | `limit` | default **1000**, max **10000** — counts data points **across all symbols**, not per symbol | | `page_token` | pagination cursor (from `next_page_token`) | | `adjustment` | `raw` (default), `split`, `dividend`, `spin-off`, `all` — comma-combinable | | `feed` | see §3 | | `sort` | `asc` (default) / `desc` | | `asof` | `YYYY-MM-DD` for symbol/name-change mapping; `-` skips mapping |
**Pagination lesson:** results are sorted by **symbol, then timestamp**. A multi-symbol request that hits `limit` may return only the first symbol(s) — you must follow `next_page_token` until empty to get them all. Don't assume one page = all symbols.
## 3. Feeds (entitlement matters)
- `iex` — single exchange (~2.5% of volume). **The only feed available without a paid subscription.** Good for dev/testing. - `sip` — consolidated, all exchanges (100% volume). **Requires a paid data plan.** - `delayed_sip` — SIP delayed 15 min (latest/snapshot endpoints). - `otc`, `boats` (Blue Ocean overnight ATS), `overnight` (Alpaca-derived, cheaper).
**Lessons:** - **Pick `iex` explicitly** if you're on the free tier — some endpoints default to `sip`, which then 403s without entitlement. (A common surprise: "why is my historical request failing?" → defaulted to SIP.) - Without real-time access, `start`/`end` windows **withhold the most recent 15 minutes**. - Trade/quote **sizes are in shares** as of 2025-11-03 (were round lots before).
## 4. Object shapes (compact keys)
**Snapshot** per symbol: `latestTrade`, `latestQuote`, `minuteBar`, `dailyBar`, `prevDailyBar`. Multi-symbol response is a map `{ "AAPL": {…} }`.
- **Bar:** `t` time, `o` open, `h` high, `l` low, `c` close, `v` volume, `n` trade count, `vw` VWAP. - **Trade:** `t` time, `p` price, `s` size, `x` exchange, `c` conditions, `z` tape, `i` id. - **Quote:** `bp`/`bs`/`bx` bid price/size/exchange, `ap`/`as`/`ax` ask price/size/exchange, `c` conditions, `z` tape. (price `0` = no active bid/ask.)
## 5. WebSocket protocol
**URL:** `wss://stream.data.alpaca.markets/{version}/{feed}` — e.g. `v2/iex`, `v2/sip`, `v2/delayed_sip`, `v1beta1/boats`, `v1beta1/overnight`, or `v2/test` (always-on, use symbol `FAKEPACA`).
**Connect flow:** 1. Connect → `[{"T":"success","msg":"connected"}]` 2. **Auth within 10s:** `{"action":"auth","key":"…","secret":"…"}` → `[{"T":"success","msg":"authenticated"}]` 3. Subscribe: `{"action":"subscribe","trades":["AAPL"],"quotes":["AMD"],"bars":["*"]}` → server echoes full subscription state. `*` = all symbols. `unsubscribe` removes.
**Message types** (every message is a **JSON array**; `T` discriminates): `t` trade, `q` quote, `b` minute bar, `d` daily bar, `u` updated bar, `s` trading status (halt/resume), `l` LULD, `c` correction, `x` cancel/error, `i` imbalance; control: `success`, `error`, `subscription`. Subscribing to `trades` auto-adds `corrections` + `cancelErrors`.
**WebSocket lessons:** - **One concurrent connection per key** on most plans — a 2nd connection → `{"code":406,"connection limit exceeded"}`. Centralize the stream in **one process** and fan out to your own clients (don't open a socket per user). - Authenticate within **10s** or get dropped (`404`). - Other error codes: `401` not auth'd, `402` auth failed, `405` symbol limit, `407` slow client, `409` insufficient subscription (feed not entitled), `410` invalid action for feed. - Messages are **batched** — always iterate the array; don't assume one frame = one event. - Handle **`u` (updated bar)** and **`c`/`x` (corrections/cancels)**: a streamed bar/trade can be revised after the fact.
## 6. Assets, clock, calendar
Use the host-appropriate path (see the table in §1): `/v2/...` on the Trading API host, `/v1/...` on the Broker API host.
- **Assets** (`GET /v2/assets` on Trading host · `GET /v1/assets` and `/v1/assets/{symbol}` on Broker host) — tradability metadata: `tradable`, `fractionable`, `marginable`, `shortable`, `borrow_status` (replaces deprecated `easy_to_borrow`), `status` (`active`/`inactive`), `class` (`us_equity`/`us_option`/`crypto`/`ipo`), `exchange`, `attributes[]` (e.g. `has_options`, `overnight_tradable`). Filter by `status`, `asset_class`, `exchange`. **Cache this** — it changes slowly; query it before trading to confirm `tradable`/`fractionable` (see `alpaca-broker-trading-orders`). - **Clock** (`/v2/clock` on Trading host · `/v1/clock` on Broker host) — `is_open`, `next_open`, `next_close`, `timestamp`. Use this to gate market-hours logic instead of hardcoding 9:30–16:00 ET. - **Calendar** (`/v2/calendar` on Trading host · `/v1/calendar` on Broker host — note there is no `/v2/calendar` on the Broker host) — per-day `open`/`close` (`HH:MM`), `session_open`/`session_close` (`HHMM`, extended hours), `settlement_date`. **Use the calendar for holidays** — a naive "weekdays only" check runs jobs on market holidays (harmless but wasteful) and miscomputes "previous trading day."
## 7. Caching strategy (cost & rate-limit lesson)
Market data is the highest-volume, highest-cost surface. Production lesson: 1. **Persist historical bars** in your own store keyed by `(symbol, timeframe, timestamp)` with upsert/skip-duplicate, and serve charts from there — only fetch the gap from Alpaca. 2. **Cache snapshots/quotes** in a short-TTL cache (TTL tuned to market-open vs closed). 3. **Run one bulk backfill job** for searchable symbols on a schedule rather than fetching per user request. 4. Always follow `next_page_token` and watch `X-RateLimit-Remaining` (see `alpaca-broker-rate-limits-resilience`).
**Related skills:** tradability before ordering → `alpaca-broker-trading-orders`; rate limits/pagination → `alpaca-broker-rate-limits-resilience`; the *broker* event stream (SSE, different from this WS) → `alpaca-broker-sse-events`.
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for alpaca-broker-market-data, ready for a manual X post.
alpaca-broker-market-data: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, histori... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x
Listing + install path for alpaca-broker-market-data: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to alpacahq but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)alpacahq
@alpacahq
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "alpaca-broker-market-data" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/market-data. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"alpacahq-alpaca-broker-market-data","task":"Install alpaca-broker-market-data","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Maintenance
fresh
11d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
112
67/100 Quality · 71/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
112 GitHub stars
Repo activity
112 stars, 11 forks
Maintenance
11d since push
License
Apache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
Agent should check
Copy prompt
Task: Use alpaca-broker-market-data in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
LLM text format
/api/skills/alpacahq-alpaca-broker-market-data/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-market-data&limit=3
Agent prompt
Use alpaca-broker-market-data for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/alpacahq-alpaca-broker-market-data
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-market-data?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-market-data
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-market-data%20in%20an%20agent%20workflow&limit=3
Agent fit
Finance and quant
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Finance and quant
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO112 GitHub stars
Stars/forks activity
CHECK112 stars, 11 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Analyze markets
I need my agent to analyze markets, financial data, filings, portfolios, and quant strategies.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: alpaca-broker-market-data description: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. ---
# Alpaca Market Data API — Stocks (REST + WebSocket)
Real-time and historical US equity data. Unlike the Broker endpoints, market data lives on **its own host with its own auth**, and the real-time feed is **WebSocket**, not SSE.
> Read `alpaca-broker-integration` first. Assets/clock/calendar live on the **Trading API** host; everything else here is the **Market Data API** host.
## Reference - Guides: `https://docs.alpaca.markets/docs/historical-stock-data`, `https://docs.alpaca.markets/docs/streaming-market-data` - Live schema: `alpaca-docs` MCP → `list-endpoints` title `"Market Data API"`
## 0. Hosts & auth
| Surface | Host | |---------|------| | Market data REST | `https://data.alpaca.markets` (sandbox `data.sandbox.alpaca.markets`) | | Market data WebSocket | `wss://stream.data.alpaca.markets/{version}/{feed}` | | Assets / clock / calendar | `https://api.alpaca.markets` (Trading API) — paper: `paper-api.alpaca.markets` |
**Auth:** headers `APCA-API-KEY-ID` / `APCA-API-SECRET-KEY` (Broker partners may use Broker Basic auth in broker context).
## 1. REST endpoints
| Path | Purpose | |------|---------| | `GET /v2/stocks/snapshots?symbols=…` · `GET /v2/stocks/{symbol}/snapshot` | Snapshot (latest trade/quote + bars) | | `GET /v2/stocks/bars?symbols=…` · `GET /v2/stocks/{symbol}/bars` | Historical OHLCV bars | | `GET /v2/stocks/bars/latest` · `…/{symbol}/bars/latest` | Latest bar(s) | | `GET /v2/stocks/trades[/latest]` · `GET /v2/stocks/quotes[/latest]` | Historical / latest trades & quotes | | `GET /v2/stocks/auctions` | Opening/closing auctions | | `GET /v2/stocks/meta/conditions/{trade\|quote}` · `/meta/exchanges` | Code lookups | | `GET /v1beta1/news?symbols=…` | News (max `limit` 50) | | `GET /v1beta1/screener/stocks/most-actives` · `/screener/{stocks\|crypto}/movers` | Screeners | | `GET /v2/assets` *(Trading API host)* · `GET /v1/assets` *(Broker API host)* | Asset master / tradability | | `GET /v2/clock` · `GET /v2/calendar` *(Trading API host)* | Market hours |
> **Clock/calendar/assets paths are host-dependent — verified live against the sandbox:** > > | Path | Trading API host (`api.alpaca.markets`) | Broker API host (`broker-api.*`) | > |------|:--:|:--:| > | `/v1/clock` | — | **200** | > | `/v2/clock` | **200** | **200** | > | `/v1/calendar` | — | **200** | > | `/v2/calendar` | **200** | **404** | > | `/v1/assets` | — | **200** | > | `/v2/assets` | **200** | **404** | > > So: on the **Trading/Market-Data API host** use `/v2/clock`, `/v2/calendar`, `/v2/assets`. On the **Broker API host** use **`/v1/clock`**, **`/v1/calendar`**, **`/v1/assets`** (`/v1/clock` and `/v2/clock` both work there; `/v2/calendar` and `/v2/assets` 404). A Broker-API integration hitting `/v1/clock` is **correct**, not stale.
## 2. Bars — params
| Param | Notes | |-------|-------| | `timeframe` | `[1-59]Min`/`T`, `[1-23]Hour`/`H`, `1Day`/`D`, `1Week`/`W`, `[1,2,3,4,6,12]Month`/`M`. Case-sensitive. e.g. `1Min`, `5Min`, `1Hour`, `1Day` | | `start` / `end` | RFC3339 or `YYYY-MM-DD`, inclusive | | `limit` | default **1000**, max **10000** — counts data points **across all symbols**, not per symbol | | `page_token` | pagination cursor (from `next_page_token`) | | `adjustment` | `raw` (default), `split`, `dividend`, `spin-off`, `all` — comma-combinable | | `feed` | see §3 | | `sort` | `asc` (default) / `desc` | | `asof` | `YYYY-MM-DD` for symbol/name-change mapping; `-` skips mapping |
**Pagination lesson:** results are sorted by **symbol, then timestamp**. A multi-symbol request that hits `limit` may return only the first symbol(s) — you must follow `next_page_token` until empty to get them all. Don't assume one page = all symbols.
## 3. Feeds (entitlement matters)
- `iex` — single exchange (~2.5% of volume). **The only feed available without a paid subscription.** Good for dev/testing. - `sip` — consolidated, all exchanges (100% volume). **Requires a paid data plan.** - `delayed_sip` — SIP delayed 15 min (latest/snapshot endpoints). - `otc`, `boats` (Blue Ocean overnight ATS), `overnight` (Alpaca-derived, cheaper).
**Lessons:** - **Pick `iex` explicitly** if you're on the free tier — some endpoints default to `sip`, which then 403s without entitlement. (A common surprise: "why is my historical request failing?" → defaulted to SIP.) - Without real-time access, `start`/`end` windows **withhold the most recent 15 minutes**. - Trade/quote **sizes are in shares** as of 2025-11-03 (were round lots before).
## 4. Object shapes (compact keys)
**Snapshot** per symbol: `latestTrade`, `latestQuote`, `minuteBar`, `dailyBar`, `prevDailyBar`. Multi-symbol response is a map `{ "AAPL": {…} }`.
- **Bar:** `t` time, `o` open, `h` high, `l` low, `c` close, `v` volume, `n` trade count, `vw` VWAP. - **Trade:** `t` time, `p` price, `s` size, `x` exchange, `c` conditions, `z` tape, `i` id. - **Quote:** `bp`/`bs`/`bx` bid price/size/exchange, `ap`/`as`/`ax` ask price/size/exchange, `c` conditions, `z` tape. (price `0` = no active bid/ask.)
## 5. WebSocket protocol
**URL:** `wss://stream.data.alpaca.markets/{version}/{feed}` — e.g. `v2/iex`, `v2/sip`, `v2/delayed_sip`, `v1beta1/boats`, `v1beta1/overnight`, or `v2/test` (always-on, use symbol `FAKEPACA`).
**Connect flow:** 1. Connect → `[{"T":"success","msg":"connected"}]` 2. **Auth within 10s:** `{"action":"auth","key":"…","secret":"…"}` → `[{"T":"success","msg":"authenticated"}]` 3. Subscribe: `{"action":"subscribe","trades":["AAPL"],"quotes":["AMD"],"bars":["*"]}` → server echoes full subscription state. `*` = all symbols. `unsubscribe` removes.
**Message types** (every message is a **JSON array**; `T` discriminates): `t` trade, `q` quote, `b` minute bar, `d` daily bar, `u` updated bar, `s` trading status (halt/resume), `l` LULD, `c` correction, `x` cancel/error, `i` imbalance; control: `success`, `error`, `subscription`. Subscribing to `trades` auto-adds `corrections` + `cancelErrors`.
**WebSocket lessons:** - **One concurrent connection per key** on most plans — a 2nd connection → `{"code":406,"connection limit exceeded"}`. Centralize the stream in **one process** and fan out to your own clients (don't open a socket per user). - Authenticate within **10s** or get dropped (`404`). - Other error codes: `401` not auth'd, `402` auth failed, `405` symbol limit, `407` slow client, `409` insufficient subscription (feed not entitled), `410` invalid action for feed. - Messages are **batched** — always iterate the array; don't assume one frame = one event. - Handle **`u` (updated bar)** and **`c`/`x` (corrections/cancels)**: a streamed bar/trade can be revised after the fact.
## 6. Assets, clock, calendar
Use the host-appropriate path (see the table in §1): `/v2/...` on the Trading API host, `/v1/...` on the Broker API host.
- **Assets** (`GET /v2/assets` on Trading host · `GET /v1/assets` and `/v1/assets/{symbol}` on Broker host) — tradability metadata: `tradable`, `fractionable`, `marginable`, `shortable`, `borrow_status` (replaces deprecated `easy_to_borrow`), `status` (`active`/`inactive`), `class` (`us_equity`/`us_option`/`crypto`/`ipo`), `exchange`, `attributes[]` (e.g. `has_options`, `overnight_tradable`). Filter by `status`, `asset_class`, `exchange`. **Cache this** — it changes slowly; query it before trading to confirm `tradable`/`fractionable` (see `alpaca-broker-trading-orders`). - **Clock** (`/v2/clock` on Trading host · `/v1/clock` on Broker host) — `is_open`, `next_open`, `next_close`, `timestamp`. Use this to gate market-hours logic instead of hardcoding 9:30–16:00 ET. - **Calendar** (`/v2/calendar` on Trading host · `/v1/calendar` on Broker host — note there is no `/v2/calendar` on the Broker host) — per-day `open`/`close` (`HH:MM`), `session_open`/`session_close` (`HHMM`, extended hours), `settlement_date`. **Use the calendar for holidays** — a naive "weekdays only" check runs jobs on market holidays (harmless but wasteful) and miscomputes "previous trading day."
## 7. Caching strategy (cost & rate-limit lesson)
Market data is the highest-volume, highest-cost surface. Production lesson: 1. **Persist historical bars** in your own store keyed by `(symbol, timeframe, timestamp)` with upsert/skip-duplicate, and serve charts from there — only fetch the gap from Alpaca. 2. **Cache snapshots/quotes** in a short-TTL cache (TTL tuned to market-open vs closed). 3. **Run one bulk backfill job** for searchable symbols on a schedule rather than fetching per user request. 4. Always follow `next_page_token` and watch `X-RateLimit-Remaining` (see `alpaca-broker-rate-limits-resilience`).
**Related skills:** tradability before ordering → `alpaca-broker-trading-orders`; rate limits/pagination → `alpaca-broker-rate-limits-resilience`; the *broker* event stream (SSE, different from this WS) → `alpaca-broker-sse-events`.
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for alpaca-broker-market-data, ready for a manual X post.
alpaca-broker-market-data: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, histori... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x
Listing + install path for alpaca-broker-market-data: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to alpacahq but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)alpacahq
@alpacahq
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "alpaca-broker-market-data" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/market-data. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"alpacahq-alpaca-broker-market-data","task":"Install alpaca-broker-market-data","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Maintenance
fresh
11d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
112
67/100 Quality · 71/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
112 GitHub stars
Repo activity
112 stars, 11 forks
Maintenance
11d since push
License
Apache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
Agent should check
Copy prompt
Task: Use alpaca-broker-market-data in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
LLM text format
/api/skills/alpacahq-alpaca-broker-market-data/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-market-data&limit=3
Agent prompt
Use alpaca-broker-market-data for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/alpacahq-alpaca-broker-market-data
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-market-data?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-market-data
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-market-data%20in%20an%20agent%20workflow&limit=3
Agent fit
Finance and quant
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Finance and quant
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO112 GitHub stars
Stars/forks activity
CHECK112 stars, 11 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Analyze markets
I need my agent to analyze markets, financial data, filings, portfolios, and quant strategies.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: alpaca-broker-market-data description: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. ---
# Alpaca Market Data API — Stocks (REST + WebSocket)
Real-time and historical US equity data. Unlike the Broker endpoints, market data lives on **its own host with its own auth**, and the real-time feed is **WebSocket**, not SSE.
> Read `alpaca-broker-integration` first. Assets/clock/calendar live on the **Trading API** host; everything else here is the **Market Data API** host.
## Reference - Guides: `https://docs.alpaca.markets/docs/historical-stock-data`, `https://docs.alpaca.markets/docs/streaming-market-data` - Live schema: `alpaca-docs` MCP → `list-endpoints` title `"Market Data API"`
## 0. Hosts & auth
| Surface | Host | |---------|------| | Market data REST | `https://data.alpaca.markets` (sandbox `data.sandbox.alpaca.markets`) | | Market data WebSocket | `wss://stream.data.alpaca.markets/{version}/{feed}` | | Assets / clock / calendar | `https://api.alpaca.markets` (Trading API) — paper: `paper-api.alpaca.markets` |
**Auth:** headers `APCA-API-KEY-ID` / `APCA-API-SECRET-KEY` (Broker partners may use Broker Basic auth in broker context).
## 1. REST endpoints
| Path | Purpose | |------|---------| | `GET /v2/stocks/snapshots?symbols=…` · `GET /v2/stocks/{symbol}/snapshot` | Snapshot (latest trade/quote + bars) | | `GET /v2/stocks/bars?symbols=…` · `GET /v2/stocks/{symbol}/bars` | Historical OHLCV bars | | `GET /v2/stocks/bars/latest` · `…/{symbol}/bars/latest` | Latest bar(s) | | `GET /v2/stocks/trades[/latest]` · `GET /v2/stocks/quotes[/latest]` | Historical / latest trades & quotes | | `GET /v2/stocks/auctions` | Opening/closing auctions | | `GET /v2/stocks/meta/conditions/{trade\|quote}` · `/meta/exchanges` | Code lookups | | `GET /v1beta1/news?symbols=…` | News (max `limit` 50) | | `GET /v1beta1/screener/stocks/most-actives` · `/screener/{stocks\|crypto}/movers` | Screeners | | `GET /v2/assets` *(Trading API host)* · `GET /v1/assets` *(Broker API host)* | Asset master / tradability | | `GET /v2/clock` · `GET /v2/calendar` *(Trading API host)* | Market hours |
> **Clock/calendar/assets paths are host-dependent — verified live against the sandbox:** > > | Path | Trading API host (`api.alpaca.markets`) | Broker API host (`broker-api.*`) | > |------|:--:|:--:| > | `/v1/clock` | — | **200** | > | `/v2/clock` | **200** | **200** | > | `/v1/calendar` | — | **200** | > | `/v2/calendar` | **200** | **404** | > | `/v1/assets` | — | **200** | > | `/v2/assets` | **200** | **404** | > > So: on the **Trading/Market-Data API host** use `/v2/clock`, `/v2/calendar`, `/v2/assets`. On the **Broker API host** use **`/v1/clock`**, **`/v1/calendar`**, **`/v1/assets`** (`/v1/clock` and `/v2/clock` both work there; `/v2/calendar` and `/v2/assets` 404). A Broker-API integration hitting `/v1/clock` is **correct**, not stale.
## 2. Bars — params
| Param | Notes | |-------|-------| | `timeframe` | `[1-59]Min`/`T`, `[1-23]Hour`/`H`, `1Day`/`D`, `1Week`/`W`, `[1,2,3,4,6,12]Month`/`M`. Case-sensitive. e.g. `1Min`, `5Min`, `1Hour`, `1Day` | | `start` / `end` | RFC3339 or `YYYY-MM-DD`, inclusive | | `limit` | default **1000**, max **10000** — counts data points **across all symbols**, not per symbol | | `page_token` | pagination cursor (from `next_page_token`) | | `adjustment` | `raw` (default), `split`, `dividend`, `spin-off`, `all` — comma-combinable | | `feed` | see §3 | | `sort` | `asc` (default) / `desc` | | `asof` | `YYYY-MM-DD` for symbol/name-change mapping; `-` skips mapping |
**Pagination lesson:** results are sorted by **symbol, then timestamp**. A multi-symbol request that hits `limit` may return only the first symbol(s) — you must follow `next_page_token` until empty to get them all. Don't assume one page = all symbols.
## 3. Feeds (entitlement matters)
- `iex` — single exchange (~2.5% of volume). **The only feed available without a paid subscription.** Good for dev/testing. - `sip` — consolidated, all exchanges (100% volume). **Requires a paid data plan.** - `delayed_sip` — SIP delayed 15 min (latest/snapshot endpoints). - `otc`, `boats` (Blue Ocean overnight ATS), `overnight` (Alpaca-derived, cheaper).
**Lessons:** - **Pick `iex` explicitly** if you're on the free tier — some endpoints default to `sip`, which then 403s without entitlement. (A common surprise: "why is my historical request failing?" → defaulted to SIP.) - Without real-time access, `start`/`end` windows **withhold the most recent 15 minutes**. - Trade/quote **sizes are in shares** as of 2025-11-03 (were round lots before).
## 4. Object shapes (compact keys)
**Snapshot** per symbol: `latestTrade`, `latestQuote`, `minuteBar`, `dailyBar`, `prevDailyBar`. Multi-symbol response is a map `{ "AAPL": {…} }`.
- **Bar:** `t` time, `o` open, `h` high, `l` low, `c` close, `v` volume, `n` trade count, `vw` VWAP. - **Trade:** `t` time, `p` price, `s` size, `x` exchange, `c` conditions, `z` tape, `i` id. - **Quote:** `bp`/`bs`/`bx` bid price/size/exchange, `ap`/`as`/`ax` ask price/size/exchange, `c` conditions, `z` tape. (price `0` = no active bid/ask.)
## 5. WebSocket protocol
**URL:** `wss://stream.data.alpaca.markets/{version}/{feed}` — e.g. `v2/iex`, `v2/sip`, `v2/delayed_sip`, `v1beta1/boats`, `v1beta1/overnight`, or `v2/test` (always-on, use symbol `FAKEPACA`).
**Connect flow:** 1. Connect → `[{"T":"success","msg":"connected"}]` 2. **Auth within 10s:** `{"action":"auth","key":"…","secret":"…"}` → `[{"T":"success","msg":"authenticated"}]` 3. Subscribe: `{"action":"subscribe","trades":["AAPL"],"quotes":["AMD"],"bars":["*"]}` → server echoes full subscription state. `*` = all symbols. `unsubscribe` removes.
**Message types** (every message is a **JSON array**; `T` discriminates): `t` trade, `q` quote, `b` minute bar, `d` daily bar, `u` updated bar, `s` trading status (halt/resume), `l` LULD, `c` correction, `x` cancel/error, `i` imbalance; control: `success`, `error`, `subscription`. Subscribing to `trades` auto-adds `corrections` + `cancelErrors`.
**WebSocket lessons:** - **One concurrent connection per key** on most plans — a 2nd connection → `{"code":406,"connection limit exceeded"}`. Centralize the stream in **one process** and fan out to your own clients (don't open a socket per user). - Authenticate within **10s** or get dropped (`404`). - Other error codes: `401` not auth'd, `402` auth failed, `405` symbol limit, `407` slow client, `409` insufficient subscription (feed not entitled), `410` invalid action for feed. - Messages are **batched** — always iterate the array; don't assume one frame = one event. - Handle **`u` (updated bar)** and **`c`/`x` (corrections/cancels)**: a streamed bar/trade can be revised after the fact.
## 6. Assets, clock, calendar
Use the host-appropriate path (see the table in §1): `/v2/...` on the Trading API host, `/v1/...` on the Broker API host.
- **Assets** (`GET /v2/assets` on Trading host · `GET /v1/assets` and `/v1/assets/{symbol}` on Broker host) — tradability metadata: `tradable`, `fractionable`, `marginable`, `shortable`, `borrow_status` (replaces deprecated `easy_to_borrow`), `status` (`active`/`inactive`), `class` (`us_equity`/`us_option`/`crypto`/`ipo`), `exchange`, `attributes[]` (e.g. `has_options`, `overnight_tradable`). Filter by `status`, `asset_class`, `exchange`. **Cache this** — it changes slowly; query it before trading to confirm `tradable`/`fractionable` (see `alpaca-broker-trading-orders`). - **Clock** (`/v2/clock` on Trading host · `/v1/clock` on Broker host) — `is_open`, `next_open`, `next_close`, `timestamp`. Use this to gate market-hours logic instead of hardcoding 9:30–16:00 ET. - **Calendar** (`/v2/calendar` on Trading host · `/v1/calendar` on Broker host — note there is no `/v2/calendar` on the Broker host) — per-day `open`/`close` (`HH:MM`), `session_open`/`session_close` (`HHMM`, extended hours), `settlement_date`. **Use the calendar for holidays** — a naive "weekdays only" check runs jobs on market holidays (harmless but wasteful) and miscomputes "previous trading day."
## 7. Caching strategy (cost & rate-limit lesson)
Market data is the highest-volume, highest-cost surface. Production lesson: 1. **Persist historical bars** in your own store keyed by `(symbol, timeframe, timestamp)` with upsert/skip-duplicate, and serve charts from there — only fetch the gap from Alpaca. 2. **Cache snapshots/quotes** in a short-TTL cache (TTL tuned to market-open vs closed). 3. **Run one bulk backfill job** for searchable symbols on a schedule rather than fetching per user request. 4. Always follow `next_page_token` and watch `X-RateLimit-Remaining` (see `alpaca-broker-rate-limits-resilience`).
**Related skills:** tradability before ordering → `alpaca-broker-trading-orders`; rate limits/pagination → `alpaca-broker-rate-limits-resilience`; the *broker* event stream (SSE, different from this WS) → `alpaca-broker-sse-events`.
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for alpaca-broker-market-data, ready for a manual X post.
alpaca-broker-market-data: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, histori... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x
Listing + install path for alpaca-broker-market-data: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to alpacahq but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)alpacahq
@alpacahq
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "alpaca-broker-market-data" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/market-data. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"alpacahq-alpaca-broker-market-data","task":"Install alpaca-broker-market-data","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Maintenance
fresh
11d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
112
67/100 Quality · 71/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Financial research output is not financial advice; require human review before any live investment decision
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
112 GitHub stars
Repo activity
112 stars, 11 forks
Maintenance
11d since push
License
Apache-2.0
Install
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
Agent should check
Copy prompt
Task: Use alpaca-broker-market-data in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-market-data%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/alpacahq-alpaca-broker-market-data/install
LLM text format
/api/skills/alpacahq-alpaca-broker-market-data/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-market-data&limit=3
Agent prompt
Use alpaca-broker-market-data for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-market-data/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-dataRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/alpacahq-alpaca-broker-market-data
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-market-data?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-market-data
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-market-data%20in%20an%20agent%20workflow&limit=3
Agent fit
Finance and quant
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
Finance and quant
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO112 GitHub stars
Stars/forks activity
CHECK112 stars, 11 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Analyze markets
I need my agent to analyze markets, financial data, filings, portfolios, and quant strategies.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: alpaca-broker-market-data description: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news, and the real-time WebSocket stream. Use when building charts, quotes, price feeds, or asset metadata on Alpaca in any language. ---
# Alpaca Market Data API — Stocks (REST + WebSocket)
Real-time and historical US equity data. Unlike the Broker endpoints, market data lives on **its own host with its own auth**, and the real-time feed is **WebSocket**, not SSE.
> Read `alpaca-broker-integration` first. Assets/clock/calendar live on the **Trading API** host; everything else here is the **Market Data API** host.
## Reference - Guides: `https://docs.alpaca.markets/docs/historical-stock-data`, `https://docs.alpaca.markets/docs/streaming-market-data` - Live schema: `alpaca-docs` MCP → `list-endpoints` title `"Market Data API"`
## 0. Hosts & auth
| Surface | Host | |---------|------| | Market data REST | `https://data.alpaca.markets` (sandbox `data.sandbox.alpaca.markets`) | | Market data WebSocket | `wss://stream.data.alpaca.markets/{version}/{feed}` | | Assets / clock / calendar | `https://api.alpaca.markets` (Trading API) — paper: `paper-api.alpaca.markets` |
**Auth:** headers `APCA-API-KEY-ID` / `APCA-API-SECRET-KEY` (Broker partners may use Broker Basic auth in broker context).
## 1. REST endpoints
| Path | Purpose | |------|---------| | `GET /v2/stocks/snapshots?symbols=…` · `GET /v2/stocks/{symbol}/snapshot` | Snapshot (latest trade/quote + bars) | | `GET /v2/stocks/bars?symbols=…` · `GET /v2/stocks/{symbol}/bars` | Historical OHLCV bars | | `GET /v2/stocks/bars/latest` · `…/{symbol}/bars/latest` | Latest bar(s) | | `GET /v2/stocks/trades[/latest]` · `GET /v2/stocks/quotes[/latest]` | Historical / latest trades & quotes | | `GET /v2/stocks/auctions` | Opening/closing auctions | | `GET /v2/stocks/meta/conditions/{trade\|quote}` · `/meta/exchanges` | Code lookups | | `GET /v1beta1/news?symbols=…` | News (max `limit` 50) | | `GET /v1beta1/screener/stocks/most-actives` · `/screener/{stocks\|crypto}/movers` | Screeners | | `GET /v2/assets` *(Trading API host)* · `GET /v1/assets` *(Broker API host)* | Asset master / tradability | | `GET /v2/clock` · `GET /v2/calendar` *(Trading API host)* | Market hours |
> **Clock/calendar/assets paths are host-dependent — verified live against the sandbox:** > > | Path | Trading API host (`api.alpaca.markets`) | Broker API host (`broker-api.*`) | > |------|:--:|:--:| > | `/v1/clock` | — | **200** | > | `/v2/clock` | **200** | **200** | > | `/v1/calendar` | — | **200** | > | `/v2/calendar` | **200** | **404** | > | `/v1/assets` | — | **200** | > | `/v2/assets` | **200** | **404** | > > So: on the **Trading/Market-Data API host** use `/v2/clock`, `/v2/calendar`, `/v2/assets`. On the **Broker API host** use **`/v1/clock`**, **`/v1/calendar`**, **`/v1/assets`** (`/v1/clock` and `/v2/clock` both work there; `/v2/calendar` and `/v2/assets` 404). A Broker-API integration hitting `/v1/clock` is **correct**, not stale.
## 2. Bars — params
| Param | Notes | |-------|-------| | `timeframe` | `[1-59]Min`/`T`, `[1-23]Hour`/`H`, `1Day`/`D`, `1Week`/`W`, `[1,2,3,4,6,12]Month`/`M`. Case-sensitive. e.g. `1Min`, `5Min`, `1Hour`, `1Day` | | `start` / `end` | RFC3339 or `YYYY-MM-DD`, inclusive | | `limit` | default **1000**, max **10000** — counts data points **across all symbols**, not per symbol | | `page_token` | pagination cursor (from `next_page_token`) | | `adjustment` | `raw` (default), `split`, `dividend`, `spin-off`, `all` — comma-combinable | | `feed` | see §3 | | `sort` | `asc` (default) / `desc` | | `asof` | `YYYY-MM-DD` for symbol/name-change mapping; `-` skips mapping |
**Pagination lesson:** results are sorted by **symbol, then timestamp**. A multi-symbol request that hits `limit` may return only the first symbol(s) — you must follow `next_page_token` until empty to get them all. Don't assume one page = all symbols.
## 3. Feeds (entitlement matters)
- `iex` — single exchange (~2.5% of volume). **The only feed available without a paid subscription.** Good for dev/testing. - `sip` — consolidated, all exchanges (100% volume). **Requires a paid data plan.** - `delayed_sip` — SIP delayed 15 min (latest/snapshot endpoints). - `otc`, `boats` (Blue Ocean overnight ATS), `overnight` (Alpaca-derived, cheaper).
**Lessons:** - **Pick `iex` explicitly** if you're on the free tier — some endpoints default to `sip`, which then 403s without entitlement. (A common surprise: "why is my historical request failing?" → defaulted to SIP.) - Without real-time access, `start`/`end` windows **withhold the most recent 15 minutes**. - Trade/quote **sizes are in shares** as of 2025-11-03 (were round lots before).
## 4. Object shapes (compact keys)
**Snapshot** per symbol: `latestTrade`, `latestQuote`, `minuteBar`, `dailyBar`, `prevDailyBar`. Multi-symbol response is a map `{ "AAPL": {…} }`.
- **Bar:** `t` time, `o` open, `h` high, `l` low, `c` close, `v` volume, `n` trade count, `vw` VWAP. - **Trade:** `t` time, `p` price, `s` size, `x` exchange, `c` conditions, `z` tape, `i` id. - **Quote:** `bp`/`bs`/`bx` bid price/size/exchange, `ap`/`as`/`ax` ask price/size/exchange, `c` conditions, `z` tape. (price `0` = no active bid/ask.)
## 5. WebSocket protocol
**URL:** `wss://stream.data.alpaca.markets/{version}/{feed}` — e.g. `v2/iex`, `v2/sip`, `v2/delayed_sip`, `v1beta1/boats`, `v1beta1/overnight`, or `v2/test` (always-on, use symbol `FAKEPACA`).
**Connect flow:** 1. Connect → `[{"T":"success","msg":"connected"}]` 2. **Auth within 10s:** `{"action":"auth","key":"…","secret":"…"}` → `[{"T":"success","msg":"authenticated"}]` 3. Subscribe: `{"action":"subscribe","trades":["AAPL"],"quotes":["AMD"],"bars":["*"]}` → server echoes full subscription state. `*` = all symbols. `unsubscribe` removes.
**Message types** (every message is a **JSON array**; `T` discriminates): `t` trade, `q` quote, `b` minute bar, `d` daily bar, `u` updated bar, `s` trading status (halt/resume), `l` LULD, `c` correction, `x` cancel/error, `i` imbalance; control: `success`, `error`, `subscription`. Subscribing to `trades` auto-adds `corrections` + `cancelErrors`.
**WebSocket lessons:** - **One concurrent connection per key** on most plans — a 2nd connection → `{"code":406,"connection limit exceeded"}`. Centralize the stream in **one process** and fan out to your own clients (don't open a socket per user). - Authenticate within **10s** or get dropped (`404`). - Other error codes: `401` not auth'd, `402` auth failed, `405` symbol limit, `407` slow client, `409` insufficient subscription (feed not entitled), `410` invalid action for feed. - Messages are **batched** — always iterate the array; don't assume one frame = one event. - Handle **`u` (updated bar)** and **`c`/`x` (corrections/cancels)**: a streamed bar/trade can be revised after the fact.
## 6. Assets, clock, calendar
Use the host-appropriate path (see the table in §1): `/v2/...` on the Trading API host, `/v1/...` on the Broker API host.
- **Assets** (`GET /v2/assets` on Trading host · `GET /v1/assets` and `/v1/assets/{symbol}` on Broker host) — tradability metadata: `tradable`, `fractionable`, `marginable`, `shortable`, `borrow_status` (replaces deprecated `easy_to_borrow`), `status` (`active`/`inactive`), `class` (`us_equity`/`us_option`/`crypto`/`ipo`), `exchange`, `attributes[]` (e.g. `has_options`, `overnight_tradable`). Filter by `status`, `asset_class`, `exchange`. **Cache this** — it changes slowly; query it before trading to confirm `tradable`/`fractionable` (see `alpaca-broker-trading-orders`). - **Clock** (`/v2/clock` on Trading host · `/v1/clock` on Broker host) — `is_open`, `next_open`, `next_close`, `timestamp`. Use this to gate market-hours logic instead of hardcoding 9:30–16:00 ET. - **Calendar** (`/v2/calendar` on Trading host · `/v1/calendar` on Broker host — note there is no `/v2/calendar` on the Broker host) — per-day `open`/`close` (`HH:MM`), `session_open`/`session_close` (`HHMM`, extended hours), `settlement_date`. **Use the calendar for holidays** — a naive "weekdays only" check runs jobs on market holidays (harmless but wasteful) and miscomputes "previous trading day."
## 7. Caching strategy (cost & rate-limit lesson)
Market data is the highest-volume, highest-cost surface. Production lesson: 1. **Persist historical bars** in your own store keyed by `(symbol, timeframe, timestamp)` with upsert/skip-duplicate, and serve charts from there — only fetch the gap from Alpaca. 2. **Cache snapshots/quotes** in a short-TTL cache (TTL tuned to market-open vs closed). 3. **Run one bulk backfill job** for searchable symbols on a schedule rather than fetching per user request. 4. Always follow `next_page_token` and watch `X-RateLimit-Remaining` (see `alpaca-broker-rate-limits-resilience`).
**Related skills:** tradability before ordering → `alpaca-broker-trading-orders`; rate limits/pagination → `alpaca-broker-rate-limits-resilience`; the *broker* event stream (SSE, different from this WS) → `alpaca-broker-sse-events`.
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for alpaca-broker-market-data, ready for a manual X post.
alpaca-broker-market-data: Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, histori... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x
Listing + install path for alpaca-broker-market-data: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-market-data
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to alpacahq but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-market-data?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)alpacahq
@alpacahq
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsPermission surface
secrets or environment access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness