Creator · alpacahq
Last updated · Sep 1, 2026
Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event
Creator · alpacahq
Last updated · Sep 1, 2026
Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event
Creator · alpacahq
Last updated · Sep 1, 2026
Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event
Creator · alpacahq
Last updated · Sep 1, 2026
Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event
Do not auto-install
Install targets
Codex install prompt
Install the "alpaca-broker-integration" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/integration. 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: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. 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-integration","task":"Install alpaca-broker-integration","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
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
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-integration
Maintenance
fresh
11d since push
Risk
Risky
Dependency or permission surface needs review
GitHub quality
112
67/100 Quality · 65/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
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
Do not auto-installTrust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Choose a stronger alternative or inspect the source manually before any install attempt.
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-integration
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-integrationDo 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
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
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-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-integration/install
Agent should check
Copy prompt
Task: Use alpaca-broker-integration in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration/install
LLM text format
/api/skills/alpacahq-alpaca-broker-integration/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-integration&limit=3
Agent prompt
Use alpaca-broker-integration for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integrationRegistry 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-integration
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-integration?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-integration
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-integration%20in%20an%20agent%20workflow&limit=3
Agent fit
RAG and knowledge
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
RAG and knowledge
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Trust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
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
Choose a stronger alternative or inspect the source manually before any install attempt.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Parse messy files
I need my agent to read PDFs, extract tables, and turn documents into structured data.
Workflow fit
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
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.
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-integration description: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. ---
# Alpaca Integration Assistant
You are an expert on the **Alpaca** APIs. Help developers integrate with Alpaca in **any programming language**. Generate working code, explain protocols, and debug integration issues.
This is the **router / overview** skill. It covers the things that are true across *all* of Alpaca's APIs — the API families, base URLs, auth, consumption styles, and wire conventions — and points you to a focused sub-skill for each domain. Read this first, then jump to the specific skill for the task.
> Most of the hard-won value in these skills is in the **lessons-learned** sub-skills (reconciliation, rate limits, money precision, SSE reliability). Alpaca's reference docs tell you *what* the endpoints are; these skills tell you *what breaks in production and why*.
---
## Reference Documentation
- Docs home: `https://docs.alpaca.markets/` - API reference: `https://docs.alpaca.markets/reference/` - Machine-readable index: `https://docs.alpaca.markets/llms.txt` and `https://docs.alpaca.markets/llms-full.txt` - OpenAPI specs (4): **Authentication API**, **Broker API**, **Market Data API**, **Trading API**
**Live schema lookups:** if the `alpaca-docs` MCP server is connected, prefer it over guessing — `list-specs`, `list-endpoints`, `get-endpoint` (exact request/response schemas + servers), and `search` / `fetch` (guide pages). Always confirm an exact payload against the spec before generating code that posts money or orders.
---
## 1. The four API families
| Family | What it's for | Who uses it | |--------|---------------|-------------| | **Broker API** | Open & manage brokerage accounts on behalf of *your* end users (KYC, funding, journals, trading-for-accounts, documents, events). You are the broker-of-record's tech partner; you custody many sub-accounts under your firm. | Apps that onboard their own users and hold their assets (neobrokers, fintechs). | | **Trading API** | Trade a *single* account that belongs to the API-key holder. | Individual algo traders, bots. | | **Market Data API** | Real-time + historical prices, bars, quotes, trades, news, corporate actions, screener. REST and WebSocket. | Everyone. | | **Authentication API** | OAuth 2.0 flows for letting third parties act on an Alpaca account. | OAuth integrations. |
**Decide first which family you're on — it changes the base URL, the auth, and the URL shape of every call.** The most common confusion: Broker API places orders at `/v1/trading/accounts/{account_id}/orders` (the account is in the path because you act *for* a user), whereas the standalone Trading API places orders at `/v2/orders` (implicitly *your own* account).
These skills focus primarily on the **Broker API**, because that's where the lifecycle is hardest: onboarding, funding rails, journals, and event reconciliation.
---
## 2. Base URLs
| Family | Production | Sandbox / Paper | |--------|-----------|-----------------| | **Broker API** | `https://broker-api.alpaca.markets` | `https://broker-api.sandbox.alpaca.markets` | | **Trading API** | `https://api.alpaca.markets` | `https://paper-api.alpaca.markets` (paper) | | **Market Data (REST)** | `https://data.alpaca.markets` | *(same host; sandbox data is limited)* | | **Market Data (WebSocket)** | `wss://stream.data.alpaca.markets` | `wss://stream.data.sandbox.alpaca.markets` |
**Always start in sandbox.** Switch by environment variable, never by code path — a single `ENV` flag that selects the base URL is the pattern that survives. Sandbox accounts can be funded with fake money and auto-approved, so you can exercise the full lifecycle without real KYC or cash.
---
## 3. Authentication
Auth differs **by API family** — this trips people up constantly.
### Broker API → HTTP Basic
``` Authorization: Basic base64("<API_KEY_ID>:<API_SECRET_KEY>") ```
The same Basic credential authenticates Broker REST, Broker SSE event streams, and trading-on-behalf-of-accounts. Build the base64 token **once** at startup; don't recompute per request.
### Market Data API → key/secret headers (or Basic in broker context)
``` APCA-API-KEY-ID: <API_KEY_ID> APCA-API-SECRET-KEY: <API_SECRET_KEY> ```
For the WebSocket data stream, you don't use headers — you send an auth message *after* connecting: ```json {"action": "auth", "key": "<API_KEY_ID>", "secret": "<API_SECRET_KEY>"} ```
> Broker API partners can usually authenticate market-data calls with their **Broker Basic** credentials too. Pick one scheme per data client and be consistent; mixing them is a frequent source of 401s.
### Trading API → key/secret headers Same `APCA-API-*` headers as market data.
### Authentication API → OAuth 2.0 Bearer For OAuth integrations, exchange the code for a token and send `Authorization: Bearer <token>`.
---
## 4. Three consumption styles
Alpaca gives you three transports. Use the right one for the job — and know that they have **different auth and different reliability characteristics**.
| Style | Transport | Use for | Skill | |-------|-----------|---------|-------| | **REST** | HTTPS request/response | Everything transactional: create account, fund, journal, place order, query state. | the domain skills | | **SSE** | `text/event-stream` over a long-lived HTTPS GET | Broker lifecycle events: account status, journals, transfers, trades, non-trade activities. **Replayable** via cursors. | `alpaca-broker-sse-events` | | **WebSocket** | `wss://` | Real-time market data (trades/quotes/bars). | `alpaca-broker-market-data` |
**Key distinction:** Broker *events* come over **SSE** (simple HTTP, Basic auth, replayable with `since`/`since_id`). Market *data* comes over **WebSocket** (subscribe model, auth message, ping/pong). They are different endpoints with different auth — don't conflate them.
---
## 5. Wire conventions (true across the platform)
These apply everywhere and are the source of most subtle bugs:
- **Numbers are strings.** Prices, quantities, notional, and money amounts come back as JSON strings (`"100.50"`, `"1.5"`). Parse into a decimal type, never a binary float. See `alpaca-broker-money-precision`. - **IDs:** `account_id`, `order_id`, `journal_id`, `transfer_id` are UUIDs. Activity IDs and newer event IDs are **ULIDs** — lexicographically sortable, which matters for event ordering and replay cursors. - **Idempotency:** pass your own `client_order_id` on orders so retries don't double-fill. Records you create from events should be keyed on the Alpaca ID with upsert/skip-duplicate semantics. See `alpaca-broker-reconciliation-idempotency`. - **Pagination:** list endpoints page forward with a token. Market-data bars return `next_page_token` in the body; activities return a page token via the `X-Next-Page-Token` response header. Loop until the token is empty. - **Rate limits:** responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix seconds). On HTTP `429`, wait until reset before retrying. See `alpaca-broker-rate-limits-resilience`. - **Timestamps:** RFC3339 (e.g. `2026-01-02T15:04:05Z`). SSE `since`/`until` accept RFC3339, but `+` in a timezone offset must be URL-encoded as `%2B`. - **Status ≠ done.** Almost every write (account, journal, transfer, order) is asynchronous and moves through a **state machine**. A `200` means "accepted," not "settled." Always reconcile on the terminal status, which arrives later via event or poll.
---
## 6. Sandbox-first workflow
When helping someone start from zero, walk them through this order:
1. **Pick sandbox URLs** via an `ENV` switch. 2. **Authenticate** with Basic (Broker) — verify with `GET /v1/accounts` (list). 3. **Create an account** with full KYC payload → `alpaca-broker-account-onboarding`. 4. **Wait for `ACTIVE`** status (via SSE account-status events or polling) before any money/trade op. 5. **Fund it** (sandbox lets you simulate deposits) → `alpaca-broker-funding-transfers`. 6. **Move cash where it's needed** with journals → `alpaca-broker-journals`. 7. **Place an order** → `alpaca-broker-trading-orders`. 8. **Subscribe to events** to track fills/transfers in real time → `alpaca-broker-sse-events`. 9. **Add a reconciliation pass** before going live → `alpaca-broker-reconciliation-idempotency`.
---
## 7. Skill map — where to go next
| If the task is about… | Use skill | |-----------------------|-----------| | Creating accounts, KYC, CIP, document upload, agreements, account status, W-8BEN | **`alpaca-broker-account-onboarding`** | | ACH / wire / funding-wallet rails, deposits, withdrawals, transfer status, the omnibus/float-account model | **`alpaca-broker-funding-transfers`** | | Moving cash (JNLC) or shares (JNLS) between accounts, batch & reverse-batch, journal lifecycle | **`alpaca-broker-journals`** | | Placing/canceling orders, qty vs notional, fractional shares, order lifecycle, positions, recurring buys | **`alpaca-broker-trading-orders`** | | Snapshots, bars, quotes, assets, news, market clock/calendar, feeds (IEX/SIP), WebSocket price streams | **`alpaca-broker-market-data`** | | Consuming Broker SSE event streams reliably (reconnect, heartbeats, replay cursors) | **`alpaca-broker-sse-events`** | | Keeping local state correct: missed-event recovery, polling rails without webhooks, idempotency, status guards | **`alpaca-broker-reconciliation-idempotency`** | | Backoff, 429 handling, rate-limit headers, concurrency limits, batch sizing | **`alpaca-broker-rate-limits-resilience`** | | Handling money correctly: decimals vs floats, numbers-as-strings, truncation/rounding | **`alpaca-broker-money-precision`** |
---
## 8. Integration guidance (applies regardless of language)
1. **One base-URL switch, environment-driven.** Never hardcode prod URLs in a code branch. 2. **Build auth once.** Cache the Basic token / header set at client construction. 3. **Treat every write as async.** Model the state machine; act on terminal states, not on the `2xx`. 4. **Persist Alpaca's IDs.** Store `account_id`, `order_id`, `journal_id`, `transfer_id` on your local records — they are your only correlation key for events and reconciliation. 5. **Decimals, not floats**, for anything monetary. Parse the string fields into a decimal type. 6. **Reconcile, don't trust the stream.** SSE can drop events; design a polling/heal pass that re-syncs from Alpaca as source of truth (`alpaca-broker-reconciliation-idempotency`). 7. **Respect rate limits proactively.** Watch `X-RateLimit-Remaining`, back off before you get throttled. 8. **Use `client_order_id`** and Alpaca-ID-keyed upserts so retries and duplicate events are safe.
### Language notes (transport only — Alpaca is HTTP/SSE/WS, so any stack works)
- **Python:** `httpx`/`requests` (REST), `httpx`/`aiohttp` or an SSE client for events, `websockets` for data, `decimal.Decimal` for money. - **TypeScript/Node:** `fetch` (REST), an `EventSource` implementation for SSE (pass the `Authorization` header), `ws` for WebSocket, decimal-as-string or `decimal.js`. - **Go:** `net/http` (REST + SSE via a streaming `bufio.Scanner`), `gorilla/websocket` for data; be deliberate about money types (`shopspring/decimal` if precision matters). - **Any language:** SSE is just a long-lived HTTP GET that yields `text/event-stream`; if no SSE client exists, read the response body line-by-line and parse `data:` frames.
Alpaca also publishes official SDKs (`alpaca-py`, `@alpacahq/alpaca-trade-api` / `typescript-sdk`, Go community SDKs). Offer them when the user wants speed, but these skills teach the **wire protocol** so the knowledge transfers to any
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-integration, ready for a manual X post.
alpaca-broker-integration: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x
Listing + install path for alpaca-broker-integration: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?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.
Do not auto-install
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 StarsDo not auto-install
Install targets
Codex install prompt
Install the "alpaca-broker-integration" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/integration. 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: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. 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-integration","task":"Install alpaca-broker-integration","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
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
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-integration
Maintenance
fresh
11d since push
Risk
Risky
Dependency or permission surface needs review
GitHub quality
112
67/100 Quality · 65/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
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
Do not auto-installTrust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Choose a stronger alternative or inspect the source manually before any install attempt.
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-integration
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-integrationDo 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
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
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-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-integration/install
Agent should check
Copy prompt
Task: Use alpaca-broker-integration in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration/install
LLM text format
/api/skills/alpacahq-alpaca-broker-integration/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-integration&limit=3
Agent prompt
Use alpaca-broker-integration for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integrationRegistry 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-integration
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-integration?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-integration
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-integration%20in%20an%20agent%20workflow&limit=3
Agent fit
RAG and knowledge
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
RAG and knowledge
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Trust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
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
Choose a stronger alternative or inspect the source manually before any install attempt.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Parse messy files
I need my agent to read PDFs, extract tables, and turn documents into structured data.
Workflow fit
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
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.
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-integration description: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. ---
# Alpaca Integration Assistant
You are an expert on the **Alpaca** APIs. Help developers integrate with Alpaca in **any programming language**. Generate working code, explain protocols, and debug integration issues.
This is the **router / overview** skill. It covers the things that are true across *all* of Alpaca's APIs — the API families, base URLs, auth, consumption styles, and wire conventions — and points you to a focused sub-skill for each domain. Read this first, then jump to the specific skill for the task.
> Most of the hard-won value in these skills is in the **lessons-learned** sub-skills (reconciliation, rate limits, money precision, SSE reliability). Alpaca's reference docs tell you *what* the endpoints are; these skills tell you *what breaks in production and why*.
---
## Reference Documentation
- Docs home: `https://docs.alpaca.markets/` - API reference: `https://docs.alpaca.markets/reference/` - Machine-readable index: `https://docs.alpaca.markets/llms.txt` and `https://docs.alpaca.markets/llms-full.txt` - OpenAPI specs (4): **Authentication API**, **Broker API**, **Market Data API**, **Trading API**
**Live schema lookups:** if the `alpaca-docs` MCP server is connected, prefer it over guessing — `list-specs`, `list-endpoints`, `get-endpoint` (exact request/response schemas + servers), and `search` / `fetch` (guide pages). Always confirm an exact payload against the spec before generating code that posts money or orders.
---
## 1. The four API families
| Family | What it's for | Who uses it | |--------|---------------|-------------| | **Broker API** | Open & manage brokerage accounts on behalf of *your* end users (KYC, funding, journals, trading-for-accounts, documents, events). You are the broker-of-record's tech partner; you custody many sub-accounts under your firm. | Apps that onboard their own users and hold their assets (neobrokers, fintechs). | | **Trading API** | Trade a *single* account that belongs to the API-key holder. | Individual algo traders, bots. | | **Market Data API** | Real-time + historical prices, bars, quotes, trades, news, corporate actions, screener. REST and WebSocket. | Everyone. | | **Authentication API** | OAuth 2.0 flows for letting third parties act on an Alpaca account. | OAuth integrations. |
**Decide first which family you're on — it changes the base URL, the auth, and the URL shape of every call.** The most common confusion: Broker API places orders at `/v1/trading/accounts/{account_id}/orders` (the account is in the path because you act *for* a user), whereas the standalone Trading API places orders at `/v2/orders` (implicitly *your own* account).
These skills focus primarily on the **Broker API**, because that's where the lifecycle is hardest: onboarding, funding rails, journals, and event reconciliation.
---
## 2. Base URLs
| Family | Production | Sandbox / Paper | |--------|-----------|-----------------| | **Broker API** | `https://broker-api.alpaca.markets` | `https://broker-api.sandbox.alpaca.markets` | | **Trading API** | `https://api.alpaca.markets` | `https://paper-api.alpaca.markets` (paper) | | **Market Data (REST)** | `https://data.alpaca.markets` | *(same host; sandbox data is limited)* | | **Market Data (WebSocket)** | `wss://stream.data.alpaca.markets` | `wss://stream.data.sandbox.alpaca.markets` |
**Always start in sandbox.** Switch by environment variable, never by code path — a single `ENV` flag that selects the base URL is the pattern that survives. Sandbox accounts can be funded with fake money and auto-approved, so you can exercise the full lifecycle without real KYC or cash.
---
## 3. Authentication
Auth differs **by API family** — this trips people up constantly.
### Broker API → HTTP Basic
``` Authorization: Basic base64("<API_KEY_ID>:<API_SECRET_KEY>") ```
The same Basic credential authenticates Broker REST, Broker SSE event streams, and trading-on-behalf-of-accounts. Build the base64 token **once** at startup; don't recompute per request.
### Market Data API → key/secret headers (or Basic in broker context)
``` APCA-API-KEY-ID: <API_KEY_ID> APCA-API-SECRET-KEY: <API_SECRET_KEY> ```
For the WebSocket data stream, you don't use headers — you send an auth message *after* connecting: ```json {"action": "auth", "key": "<API_KEY_ID>", "secret": "<API_SECRET_KEY>"} ```
> Broker API partners can usually authenticate market-data calls with their **Broker Basic** credentials too. Pick one scheme per data client and be consistent; mixing them is a frequent source of 401s.
### Trading API → key/secret headers Same `APCA-API-*` headers as market data.
### Authentication API → OAuth 2.0 Bearer For OAuth integrations, exchange the code for a token and send `Authorization: Bearer <token>`.
---
## 4. Three consumption styles
Alpaca gives you three transports. Use the right one for the job — and know that they have **different auth and different reliability characteristics**.
| Style | Transport | Use for | Skill | |-------|-----------|---------|-------| | **REST** | HTTPS request/response | Everything transactional: create account, fund, journal, place order, query state. | the domain skills | | **SSE** | `text/event-stream` over a long-lived HTTPS GET | Broker lifecycle events: account status, journals, transfers, trades, non-trade activities. **Replayable** via cursors. | `alpaca-broker-sse-events` | | **WebSocket** | `wss://` | Real-time market data (trades/quotes/bars). | `alpaca-broker-market-data` |
**Key distinction:** Broker *events* come over **SSE** (simple HTTP, Basic auth, replayable with `since`/`since_id`). Market *data* comes over **WebSocket** (subscribe model, auth message, ping/pong). They are different endpoints with different auth — don't conflate them.
---
## 5. Wire conventions (true across the platform)
These apply everywhere and are the source of most subtle bugs:
- **Numbers are strings.** Prices, quantities, notional, and money amounts come back as JSON strings (`"100.50"`, `"1.5"`). Parse into a decimal type, never a binary float. See `alpaca-broker-money-precision`. - **IDs:** `account_id`, `order_id`, `journal_id`, `transfer_id` are UUIDs. Activity IDs and newer event IDs are **ULIDs** — lexicographically sortable, which matters for event ordering and replay cursors. - **Idempotency:** pass your own `client_order_id` on orders so retries don't double-fill. Records you create from events should be keyed on the Alpaca ID with upsert/skip-duplicate semantics. See `alpaca-broker-reconciliation-idempotency`. - **Pagination:** list endpoints page forward with a token. Market-data bars return `next_page_token` in the body; activities return a page token via the `X-Next-Page-Token` response header. Loop until the token is empty. - **Rate limits:** responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix seconds). On HTTP `429`, wait until reset before retrying. See `alpaca-broker-rate-limits-resilience`. - **Timestamps:** RFC3339 (e.g. `2026-01-02T15:04:05Z`). SSE `since`/`until` accept RFC3339, but `+` in a timezone offset must be URL-encoded as `%2B`. - **Status ≠ done.** Almost every write (account, journal, transfer, order) is asynchronous and moves through a **state machine**. A `200` means "accepted," not "settled." Always reconcile on the terminal status, which arrives later via event or poll.
---
## 6. Sandbox-first workflow
When helping someone start from zero, walk them through this order:
1. **Pick sandbox URLs** via an `ENV` switch. 2. **Authenticate** with Basic (Broker) — verify with `GET /v1/accounts` (list). 3. **Create an account** with full KYC payload → `alpaca-broker-account-onboarding`. 4. **Wait for `ACTIVE`** status (via SSE account-status events or polling) before any money/trade op. 5. **Fund it** (sandbox lets you simulate deposits) → `alpaca-broker-funding-transfers`. 6. **Move cash where it's needed** with journals → `alpaca-broker-journals`. 7. **Place an order** → `alpaca-broker-trading-orders`. 8. **Subscribe to events** to track fills/transfers in real time → `alpaca-broker-sse-events`. 9. **Add a reconciliation pass** before going live → `alpaca-broker-reconciliation-idempotency`.
---
## 7. Skill map — where to go next
| If the task is about… | Use skill | |-----------------------|-----------| | Creating accounts, KYC, CIP, document upload, agreements, account status, W-8BEN | **`alpaca-broker-account-onboarding`** | | ACH / wire / funding-wallet rails, deposits, withdrawals, transfer status, the omnibus/float-account model | **`alpaca-broker-funding-transfers`** | | Moving cash (JNLC) or shares (JNLS) between accounts, batch & reverse-batch, journal lifecycle | **`alpaca-broker-journals`** | | Placing/canceling orders, qty vs notional, fractional shares, order lifecycle, positions, recurring buys | **`alpaca-broker-trading-orders`** | | Snapshots, bars, quotes, assets, news, market clock/calendar, feeds (IEX/SIP), WebSocket price streams | **`alpaca-broker-market-data`** | | Consuming Broker SSE event streams reliably (reconnect, heartbeats, replay cursors) | **`alpaca-broker-sse-events`** | | Keeping local state correct: missed-event recovery, polling rails without webhooks, idempotency, status guards | **`alpaca-broker-reconciliation-idempotency`** | | Backoff, 429 handling, rate-limit headers, concurrency limits, batch sizing | **`alpaca-broker-rate-limits-resilience`** | | Handling money correctly: decimals vs floats, numbers-as-strings, truncation/rounding | **`alpaca-broker-money-precision`** |
---
## 8. Integration guidance (applies regardless of language)
1. **One base-URL switch, environment-driven.** Never hardcode prod URLs in a code branch. 2. **Build auth once.** Cache the Basic token / header set at client construction. 3. **Treat every write as async.** Model the state machine; act on terminal states, not on the `2xx`. 4. **Persist Alpaca's IDs.** Store `account_id`, `order_id`, `journal_id`, `transfer_id` on your local records — they are your only correlation key for events and reconciliation. 5. **Decimals, not floats**, for anything monetary. Parse the string fields into a decimal type. 6. **Reconcile, don't trust the stream.** SSE can drop events; design a polling/heal pass that re-syncs from Alpaca as source of truth (`alpaca-broker-reconciliation-idempotency`). 7. **Respect rate limits proactively.** Watch `X-RateLimit-Remaining`, back off before you get throttled. 8. **Use `client_order_id`** and Alpaca-ID-keyed upserts so retries and duplicate events are safe.
### Language notes (transport only — Alpaca is HTTP/SSE/WS, so any stack works)
- **Python:** `httpx`/`requests` (REST), `httpx`/`aiohttp` or an SSE client for events, `websockets` for data, `decimal.Decimal` for money. - **TypeScript/Node:** `fetch` (REST), an `EventSource` implementation for SSE (pass the `Authorization` header), `ws` for WebSocket, decimal-as-string or `decimal.js`. - **Go:** `net/http` (REST + SSE via a streaming `bufio.Scanner`), `gorilla/websocket` for data; be deliberate about money types (`shopspring/decimal` if precision matters). - **Any language:** SSE is just a long-lived HTTP GET that yields `text/event-stream`; if no SSE client exists, read the response body line-by-line and parse `data:` frames.
Alpaca also publishes official SDKs (`alpaca-py`, `@alpacahq/alpaca-trade-api` / `typescript-sdk`, Go community SDKs). Offer them when the user wants speed, but these skills teach the **wire protocol** so the knowledge transfers to any
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-integration, ready for a manual X post.
alpaca-broker-integration: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x
Listing + install path for alpaca-broker-integration: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?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.
Do not auto-install
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 StarsDo not auto-install
Install targets
Codex install prompt
Install the "alpaca-broker-integration" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/integration. 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: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. 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-integration","task":"Install alpaca-broker-integration","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
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
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-integration
Maintenance
fresh
11d since push
Risk
Risky
Dependency or permission surface needs review
GitHub quality
112
67/100 Quality · 65/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
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
Do not auto-installTrust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Choose a stronger alternative or inspect the source manually before any install attempt.
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-integration
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-integrationDo 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
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
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-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-integration/install
Agent should check
Copy prompt
Task: Use alpaca-broker-integration in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration/install
LLM text format
/api/skills/alpacahq-alpaca-broker-integration/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-integration&limit=3
Agent prompt
Use alpaca-broker-integration for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integrationRegistry 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-integration
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-integration?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-integration
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-integration%20in%20an%20agent%20workflow&limit=3
Agent fit
RAG and knowledge
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
RAG and knowledge
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Trust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
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
Choose a stronger alternative or inspect the source manually before any install attempt.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Parse messy files
I need my agent to read PDFs, extract tables, and turn documents into structured data.
Workflow fit
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
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.
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-integration description: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. ---
# Alpaca Integration Assistant
You are an expert on the **Alpaca** APIs. Help developers integrate with Alpaca in **any programming language**. Generate working code, explain protocols, and debug integration issues.
This is the **router / overview** skill. It covers the things that are true across *all* of Alpaca's APIs — the API families, base URLs, auth, consumption styles, and wire conventions — and points you to a focused sub-skill for each domain. Read this first, then jump to the specific skill for the task.
> Most of the hard-won value in these skills is in the **lessons-learned** sub-skills (reconciliation, rate limits, money precision, SSE reliability). Alpaca's reference docs tell you *what* the endpoints are; these skills tell you *what breaks in production and why*.
---
## Reference Documentation
- Docs home: `https://docs.alpaca.markets/` - API reference: `https://docs.alpaca.markets/reference/` - Machine-readable index: `https://docs.alpaca.markets/llms.txt` and `https://docs.alpaca.markets/llms-full.txt` - OpenAPI specs (4): **Authentication API**, **Broker API**, **Market Data API**, **Trading API**
**Live schema lookups:** if the `alpaca-docs` MCP server is connected, prefer it over guessing — `list-specs`, `list-endpoints`, `get-endpoint` (exact request/response schemas + servers), and `search` / `fetch` (guide pages). Always confirm an exact payload against the spec before generating code that posts money or orders.
---
## 1. The four API families
| Family | What it's for | Who uses it | |--------|---------------|-------------| | **Broker API** | Open & manage brokerage accounts on behalf of *your* end users (KYC, funding, journals, trading-for-accounts, documents, events). You are the broker-of-record's tech partner; you custody many sub-accounts under your firm. | Apps that onboard their own users and hold their assets (neobrokers, fintechs). | | **Trading API** | Trade a *single* account that belongs to the API-key holder. | Individual algo traders, bots. | | **Market Data API** | Real-time + historical prices, bars, quotes, trades, news, corporate actions, screener. REST and WebSocket. | Everyone. | | **Authentication API** | OAuth 2.0 flows for letting third parties act on an Alpaca account. | OAuth integrations. |
**Decide first which family you're on — it changes the base URL, the auth, and the URL shape of every call.** The most common confusion: Broker API places orders at `/v1/trading/accounts/{account_id}/orders` (the account is in the path because you act *for* a user), whereas the standalone Trading API places orders at `/v2/orders` (implicitly *your own* account).
These skills focus primarily on the **Broker API**, because that's where the lifecycle is hardest: onboarding, funding rails, journals, and event reconciliation.
---
## 2. Base URLs
| Family | Production | Sandbox / Paper | |--------|-----------|-----------------| | **Broker API** | `https://broker-api.alpaca.markets` | `https://broker-api.sandbox.alpaca.markets` | | **Trading API** | `https://api.alpaca.markets` | `https://paper-api.alpaca.markets` (paper) | | **Market Data (REST)** | `https://data.alpaca.markets` | *(same host; sandbox data is limited)* | | **Market Data (WebSocket)** | `wss://stream.data.alpaca.markets` | `wss://stream.data.sandbox.alpaca.markets` |
**Always start in sandbox.** Switch by environment variable, never by code path — a single `ENV` flag that selects the base URL is the pattern that survives. Sandbox accounts can be funded with fake money and auto-approved, so you can exercise the full lifecycle without real KYC or cash.
---
## 3. Authentication
Auth differs **by API family** — this trips people up constantly.
### Broker API → HTTP Basic
``` Authorization: Basic base64("<API_KEY_ID>:<API_SECRET_KEY>") ```
The same Basic credential authenticates Broker REST, Broker SSE event streams, and trading-on-behalf-of-accounts. Build the base64 token **once** at startup; don't recompute per request.
### Market Data API → key/secret headers (or Basic in broker context)
``` APCA-API-KEY-ID: <API_KEY_ID> APCA-API-SECRET-KEY: <API_SECRET_KEY> ```
For the WebSocket data stream, you don't use headers — you send an auth message *after* connecting: ```json {"action": "auth", "key": "<API_KEY_ID>", "secret": "<API_SECRET_KEY>"} ```
> Broker API partners can usually authenticate market-data calls with their **Broker Basic** credentials too. Pick one scheme per data client and be consistent; mixing them is a frequent source of 401s.
### Trading API → key/secret headers Same `APCA-API-*` headers as market data.
### Authentication API → OAuth 2.0 Bearer For OAuth integrations, exchange the code for a token and send `Authorization: Bearer <token>`.
---
## 4. Three consumption styles
Alpaca gives you three transports. Use the right one for the job — and know that they have **different auth and different reliability characteristics**.
| Style | Transport | Use for | Skill | |-------|-----------|---------|-------| | **REST** | HTTPS request/response | Everything transactional: create account, fund, journal, place order, query state. | the domain skills | | **SSE** | `text/event-stream` over a long-lived HTTPS GET | Broker lifecycle events: account status, journals, transfers, trades, non-trade activities. **Replayable** via cursors. | `alpaca-broker-sse-events` | | **WebSocket** | `wss://` | Real-time market data (trades/quotes/bars). | `alpaca-broker-market-data` |
**Key distinction:** Broker *events* come over **SSE** (simple HTTP, Basic auth, replayable with `since`/`since_id`). Market *data* comes over **WebSocket** (subscribe model, auth message, ping/pong). They are different endpoints with different auth — don't conflate them.
---
## 5. Wire conventions (true across the platform)
These apply everywhere and are the source of most subtle bugs:
- **Numbers are strings.** Prices, quantities, notional, and money amounts come back as JSON strings (`"100.50"`, `"1.5"`). Parse into a decimal type, never a binary float. See `alpaca-broker-money-precision`. - **IDs:** `account_id`, `order_id`, `journal_id`, `transfer_id` are UUIDs. Activity IDs and newer event IDs are **ULIDs** — lexicographically sortable, which matters for event ordering and replay cursors. - **Idempotency:** pass your own `client_order_id` on orders so retries don't double-fill. Records you create from events should be keyed on the Alpaca ID with upsert/skip-duplicate semantics. See `alpaca-broker-reconciliation-idempotency`. - **Pagination:** list endpoints page forward with a token. Market-data bars return `next_page_token` in the body; activities return a page token via the `X-Next-Page-Token` response header. Loop until the token is empty. - **Rate limits:** responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix seconds). On HTTP `429`, wait until reset before retrying. See `alpaca-broker-rate-limits-resilience`. - **Timestamps:** RFC3339 (e.g. `2026-01-02T15:04:05Z`). SSE `since`/`until` accept RFC3339, but `+` in a timezone offset must be URL-encoded as `%2B`. - **Status ≠ done.** Almost every write (account, journal, transfer, order) is asynchronous and moves through a **state machine**. A `200` means "accepted," not "settled." Always reconcile on the terminal status, which arrives later via event or poll.
---
## 6. Sandbox-first workflow
When helping someone start from zero, walk them through this order:
1. **Pick sandbox URLs** via an `ENV` switch. 2. **Authenticate** with Basic (Broker) — verify with `GET /v1/accounts` (list). 3. **Create an account** with full KYC payload → `alpaca-broker-account-onboarding`. 4. **Wait for `ACTIVE`** status (via SSE account-status events or polling) before any money/trade op. 5. **Fund it** (sandbox lets you simulate deposits) → `alpaca-broker-funding-transfers`. 6. **Move cash where it's needed** with journals → `alpaca-broker-journals`. 7. **Place an order** → `alpaca-broker-trading-orders`. 8. **Subscribe to events** to track fills/transfers in real time → `alpaca-broker-sse-events`. 9. **Add a reconciliation pass** before going live → `alpaca-broker-reconciliation-idempotency`.
---
## 7. Skill map — where to go next
| If the task is about… | Use skill | |-----------------------|-----------| | Creating accounts, KYC, CIP, document upload, agreements, account status, W-8BEN | **`alpaca-broker-account-onboarding`** | | ACH / wire / funding-wallet rails, deposits, withdrawals, transfer status, the omnibus/float-account model | **`alpaca-broker-funding-transfers`** | | Moving cash (JNLC) or shares (JNLS) between accounts, batch & reverse-batch, journal lifecycle | **`alpaca-broker-journals`** | | Placing/canceling orders, qty vs notional, fractional shares, order lifecycle, positions, recurring buys | **`alpaca-broker-trading-orders`** | | Snapshots, bars, quotes, assets, news, market clock/calendar, feeds (IEX/SIP), WebSocket price streams | **`alpaca-broker-market-data`** | | Consuming Broker SSE event streams reliably (reconnect, heartbeats, replay cursors) | **`alpaca-broker-sse-events`** | | Keeping local state correct: missed-event recovery, polling rails without webhooks, idempotency, status guards | **`alpaca-broker-reconciliation-idempotency`** | | Backoff, 429 handling, rate-limit headers, concurrency limits, batch sizing | **`alpaca-broker-rate-limits-resilience`** | | Handling money correctly: decimals vs floats, numbers-as-strings, truncation/rounding | **`alpaca-broker-money-precision`** |
---
## 8. Integration guidance (applies regardless of language)
1. **One base-URL switch, environment-driven.** Never hardcode prod URLs in a code branch. 2. **Build auth once.** Cache the Basic token / header set at client construction. 3. **Treat every write as async.** Model the state machine; act on terminal states, not on the `2xx`. 4. **Persist Alpaca's IDs.** Store `account_id`, `order_id`, `journal_id`, `transfer_id` on your local records — they are your only correlation key for events and reconciliation. 5. **Decimals, not floats**, for anything monetary. Parse the string fields into a decimal type. 6. **Reconcile, don't trust the stream.** SSE can drop events; design a polling/heal pass that re-syncs from Alpaca as source of truth (`alpaca-broker-reconciliation-idempotency`). 7. **Respect rate limits proactively.** Watch `X-RateLimit-Remaining`, back off before you get throttled. 8. **Use `client_order_id`** and Alpaca-ID-keyed upserts so retries and duplicate events are safe.
### Language notes (transport only — Alpaca is HTTP/SSE/WS, so any stack works)
- **Python:** `httpx`/`requests` (REST), `httpx`/`aiohttp` or an SSE client for events, `websockets` for data, `decimal.Decimal` for money. - **TypeScript/Node:** `fetch` (REST), an `EventSource` implementation for SSE (pass the `Authorization` header), `ws` for WebSocket, decimal-as-string or `decimal.js`. - **Go:** `net/http` (REST + SSE via a streaming `bufio.Scanner`), `gorilla/websocket` for data; be deliberate about money types (`shopspring/decimal` if precision matters). - **Any language:** SSE is just a long-lived HTTP GET that yields `text/event-stream`; if no SSE client exists, read the response body line-by-line and parse `data:` frames.
Alpaca also publishes official SDKs (`alpaca-py`, `@alpacahq/alpaca-trade-api` / `typescript-sdk`, Go community SDKs). Offer them when the user wants speed, but these skills teach the **wire protocol** so the knowledge transfers to any
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-integration, ready for a manual X post.
alpaca-broker-integration: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x
Listing + install path for alpaca-broker-integration: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?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.
Do not auto-install
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 StarsDo not auto-install
Install targets
Codex install prompt
Install the "alpaca-broker-integration" agent skill from https://github.com/alpacahq/alpaca-skills/tree/main/skills/broker-api/integration. 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: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. 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-integration","task":"Install alpaca-broker-integration","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
Deep research, source comparison, literature review, RAG, knowledge search, and reports.
Scenario
RAG and knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
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-integration
Maintenance
fresh
11d since push
Risk
Risky
Dependency or permission surface needs review
GitHub quality
112
67/100 Quality · 65/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
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
Do not auto-installTrust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
Audit
RiskyA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Choose a stronger alternative or inspect the source manually before any install attempt.
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-integration
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-integrationDo 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
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
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-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/alpacahq-alpaca-broker-integration/install
Agent should check
Copy prompt
Task: Use alpaca-broker-integration in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20alpaca-broker-integration%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install
Install command: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration/install
LLM text format
/api/skills/alpacahq-alpaca-broker-integration/install?format=text
Find alternatives
/api/skills/search?q=alpaca-broker-integration&limit=3
Agent prompt
Use alpaca-broker-integration for this task. Review https://www.openagentskill.com/api/skills/alpacahq-alpaca-broker-integration/install, then install with: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integrationRegistry 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-integration
LLM text
/api/registry/manifest/alpacahq-alpaca-broker-integration?format=text
Install alias
/api/registry/install/alpacahq-alpaca-broker-integration
Recommend
/api/registry/recommend?task=Use%20alpaca-broker-integration%20in%20an%20agent%20workflow&limit=3
Agent fit
RAG and knowledge
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
RAG and knowledge
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Trust Score v5 found insufficient evidence for agent installation. Treat this as discovery material, not an executable recommendation.
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
Choose a stronger alternative or inspect the source manually before any install attempt.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Search private knowledge
I need my agent to build a RAG workflow over documents and retrieve reliable context.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Parse messy files
I need my agent to read PDFs, extract tables, and turn documents into structured data.
Workflow fit
Ingest, retrieve, and cite
A workflow for document-heavy agents that ingest files, create searchable knowledge, retrieve relevant context, and answer with grounded sources.
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.
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-integration description: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in any programming language. Use when a developer wants to build on Alpaca — open brokerage accounts, run KYC, fund accounts, move money via journals, place orders, consume real-time event streams, or pull market data — and need to know base URLs, auth, conventions, or which focused sub-skill to use. ---
# Alpaca Integration Assistant
You are an expert on the **Alpaca** APIs. Help developers integrate with Alpaca in **any programming language**. Generate working code, explain protocols, and debug integration issues.
This is the **router / overview** skill. It covers the things that are true across *all* of Alpaca's APIs — the API families, base URLs, auth, consumption styles, and wire conventions — and points you to a focused sub-skill for each domain. Read this first, then jump to the specific skill for the task.
> Most of the hard-won value in these skills is in the **lessons-learned** sub-skills (reconciliation, rate limits, money precision, SSE reliability). Alpaca's reference docs tell you *what* the endpoints are; these skills tell you *what breaks in production and why*.
---
## Reference Documentation
- Docs home: `https://docs.alpaca.markets/` - API reference: `https://docs.alpaca.markets/reference/` - Machine-readable index: `https://docs.alpaca.markets/llms.txt` and `https://docs.alpaca.markets/llms-full.txt` - OpenAPI specs (4): **Authentication API**, **Broker API**, **Market Data API**, **Trading API**
**Live schema lookups:** if the `alpaca-docs` MCP server is connected, prefer it over guessing — `list-specs`, `list-endpoints`, `get-endpoint` (exact request/response schemas + servers), and `search` / `fetch` (guide pages). Always confirm an exact payload against the spec before generating code that posts money or orders.
---
## 1. The four API families
| Family | What it's for | Who uses it | |--------|---------------|-------------| | **Broker API** | Open & manage brokerage accounts on behalf of *your* end users (KYC, funding, journals, trading-for-accounts, documents, events). You are the broker-of-record's tech partner; you custody many sub-accounts under your firm. | Apps that onboard their own users and hold their assets (neobrokers, fintechs). | | **Trading API** | Trade a *single* account that belongs to the API-key holder. | Individual algo traders, bots. | | **Market Data API** | Real-time + historical prices, bars, quotes, trades, news, corporate actions, screener. REST and WebSocket. | Everyone. | | **Authentication API** | OAuth 2.0 flows for letting third parties act on an Alpaca account. | OAuth integrations. |
**Decide first which family you're on — it changes the base URL, the auth, and the URL shape of every call.** The most common confusion: Broker API places orders at `/v1/trading/accounts/{account_id}/orders` (the account is in the path because you act *for* a user), whereas the standalone Trading API places orders at `/v2/orders` (implicitly *your own* account).
These skills focus primarily on the **Broker API**, because that's where the lifecycle is hardest: onboarding, funding rails, journals, and event reconciliation.
---
## 2. Base URLs
| Family | Production | Sandbox / Paper | |--------|-----------|-----------------| | **Broker API** | `https://broker-api.alpaca.markets` | `https://broker-api.sandbox.alpaca.markets` | | **Trading API** | `https://api.alpaca.markets` | `https://paper-api.alpaca.markets` (paper) | | **Market Data (REST)** | `https://data.alpaca.markets` | *(same host; sandbox data is limited)* | | **Market Data (WebSocket)** | `wss://stream.data.alpaca.markets` | `wss://stream.data.sandbox.alpaca.markets` |
**Always start in sandbox.** Switch by environment variable, never by code path — a single `ENV` flag that selects the base URL is the pattern that survives. Sandbox accounts can be funded with fake money and auto-approved, so you can exercise the full lifecycle without real KYC or cash.
---
## 3. Authentication
Auth differs **by API family** — this trips people up constantly.
### Broker API → HTTP Basic
``` Authorization: Basic base64("<API_KEY_ID>:<API_SECRET_KEY>") ```
The same Basic credential authenticates Broker REST, Broker SSE event streams, and trading-on-behalf-of-accounts. Build the base64 token **once** at startup; don't recompute per request.
### Market Data API → key/secret headers (or Basic in broker context)
``` APCA-API-KEY-ID: <API_KEY_ID> APCA-API-SECRET-KEY: <API_SECRET_KEY> ```
For the WebSocket data stream, you don't use headers — you send an auth message *after* connecting: ```json {"action": "auth", "key": "<API_KEY_ID>", "secret": "<API_SECRET_KEY>"} ```
> Broker API partners can usually authenticate market-data calls with their **Broker Basic** credentials too. Pick one scheme per data client and be consistent; mixing them is a frequent source of 401s.
### Trading API → key/secret headers Same `APCA-API-*` headers as market data.
### Authentication API → OAuth 2.0 Bearer For OAuth integrations, exchange the code for a token and send `Authorization: Bearer <token>`.
---
## 4. Three consumption styles
Alpaca gives you three transports. Use the right one for the job — and know that they have **different auth and different reliability characteristics**.
| Style | Transport | Use for | Skill | |-------|-----------|---------|-------| | **REST** | HTTPS request/response | Everything transactional: create account, fund, journal, place order, query state. | the domain skills | | **SSE** | `text/event-stream` over a long-lived HTTPS GET | Broker lifecycle events: account status, journals, transfers, trades, non-trade activities. **Replayable** via cursors. | `alpaca-broker-sse-events` | | **WebSocket** | `wss://` | Real-time market data (trades/quotes/bars). | `alpaca-broker-market-data` |
**Key distinction:** Broker *events* come over **SSE** (simple HTTP, Basic auth, replayable with `since`/`since_id`). Market *data* comes over **WebSocket** (subscribe model, auth message, ping/pong). They are different endpoints with different auth — don't conflate them.
---
## 5. Wire conventions (true across the platform)
These apply everywhere and are the source of most subtle bugs:
- **Numbers are strings.** Prices, quantities, notional, and money amounts come back as JSON strings (`"100.50"`, `"1.5"`). Parse into a decimal type, never a binary float. See `alpaca-broker-money-precision`. - **IDs:** `account_id`, `order_id`, `journal_id`, `transfer_id` are UUIDs. Activity IDs and newer event IDs are **ULIDs** — lexicographically sortable, which matters for event ordering and replay cursors. - **Idempotency:** pass your own `client_order_id` on orders so retries don't double-fill. Records you create from events should be keyed on the Alpaca ID with upsert/skip-duplicate semantics. See `alpaca-broker-reconciliation-idempotency`. - **Pagination:** list endpoints page forward with a token. Market-data bars return `next_page_token` in the body; activities return a page token via the `X-Next-Page-Token` response header. Loop until the token is empty. - **Rate limits:** responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix seconds). On HTTP `429`, wait until reset before retrying. See `alpaca-broker-rate-limits-resilience`. - **Timestamps:** RFC3339 (e.g. `2026-01-02T15:04:05Z`). SSE `since`/`until` accept RFC3339, but `+` in a timezone offset must be URL-encoded as `%2B`. - **Status ≠ done.** Almost every write (account, journal, transfer, order) is asynchronous and moves through a **state machine**. A `200` means "accepted," not "settled." Always reconcile on the terminal status, which arrives later via event or poll.
---
## 6. Sandbox-first workflow
When helping someone start from zero, walk them through this order:
1. **Pick sandbox URLs** via an `ENV` switch. 2. **Authenticate** with Basic (Broker) — verify with `GET /v1/accounts` (list). 3. **Create an account** with full KYC payload → `alpaca-broker-account-onboarding`. 4. **Wait for `ACTIVE`** status (via SSE account-status events or polling) before any money/trade op. 5. **Fund it** (sandbox lets you simulate deposits) → `alpaca-broker-funding-transfers`. 6. **Move cash where it's needed** with journals → `alpaca-broker-journals`. 7. **Place an order** → `alpaca-broker-trading-orders`. 8. **Subscribe to events** to track fills/transfers in real time → `alpaca-broker-sse-events`. 9. **Add a reconciliation pass** before going live → `alpaca-broker-reconciliation-idempotency`.
---
## 7. Skill map — where to go next
| If the task is about… | Use skill | |-----------------------|-----------| | Creating accounts, KYC, CIP, document upload, agreements, account status, W-8BEN | **`alpaca-broker-account-onboarding`** | | ACH / wire / funding-wallet rails, deposits, withdrawals, transfer status, the omnibus/float-account model | **`alpaca-broker-funding-transfers`** | | Moving cash (JNLC) or shares (JNLS) between accounts, batch & reverse-batch, journal lifecycle | **`alpaca-broker-journals`** | | Placing/canceling orders, qty vs notional, fractional shares, order lifecycle, positions, recurring buys | **`alpaca-broker-trading-orders`** | | Snapshots, bars, quotes, assets, news, market clock/calendar, feeds (IEX/SIP), WebSocket price streams | **`alpaca-broker-market-data`** | | Consuming Broker SSE event streams reliably (reconnect, heartbeats, replay cursors) | **`alpaca-broker-sse-events`** | | Keeping local state correct: missed-event recovery, polling rails without webhooks, idempotency, status guards | **`alpaca-broker-reconciliation-idempotency`** | | Backoff, 429 handling, rate-limit headers, concurrency limits, batch sizing | **`alpaca-broker-rate-limits-resilience`** | | Handling money correctly: decimals vs floats, numbers-as-strings, truncation/rounding | **`alpaca-broker-money-precision`** |
---
## 8. Integration guidance (applies regardless of language)
1. **One base-URL switch, environment-driven.** Never hardcode prod URLs in a code branch. 2. **Build auth once.** Cache the Basic token / header set at client construction. 3. **Treat every write as async.** Model the state machine; act on terminal states, not on the `2xx`. 4. **Persist Alpaca's IDs.** Store `account_id`, `order_id`, `journal_id`, `transfer_id` on your local records — they are your only correlation key for events and reconciliation. 5. **Decimals, not floats**, for anything monetary. Parse the string fields into a decimal type. 6. **Reconcile, don't trust the stream.** SSE can drop events; design a polling/heal pass that re-syncs from Alpaca as source of truth (`alpaca-broker-reconciliation-idempotency`). 7. **Respect rate limits proactively.** Watch `X-RateLimit-Remaining`, back off before you get throttled. 8. **Use `client_order_id`** and Alpaca-ID-keyed upserts so retries and duplicate events are safe.
### Language notes (transport only — Alpaca is HTTP/SSE/WS, so any stack works)
- **Python:** `httpx`/`requests` (REST), `httpx`/`aiohttp` or an SSE client for events, `websockets` for data, `decimal.Decimal` for money. - **TypeScript/Node:** `fetch` (REST), an `EventSource` implementation for SSE (pass the `Authorization` header), `ws` for WebSocket, decimal-as-string or `decimal.js`. - **Go:** `net/http` (REST + SSE via a streaming `bufio.Scanner`), `gorilla/websocket` for data; be deliberate about money types (`shopspring/decimal` if precision matters). - **Any language:** SSE is just a long-lived HTTP GET that yields `text/event-stream`; if no SSE client exists, read the response body line-by-line and parse `data:` frames.
Alpaca also publishes official SDKs (`alpaca-py`, `@alpacahq/alpaca-trade-api` / `typescript-sdk`, Go community SDKs). Offer them when the user wants speed, but these skills teach the **wire protocol** so the knowledge transfers to any
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-integration, ready for a manual X post.
alpaca-broker-integration: Entry point for integrating with the Alpaca Broker API (plus Market Data and Trading APIs) in... 112 stars https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x
Listing + install path for alpaca-broker-integration: https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=x Install: npx skills add alpacahq/alpaca-skills --skill alpaca-broker-integration
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-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration/audit)
[](https://www.openagentskill.com/skills/alpacahq-alpaca-broker-integration?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.
Do not auto-install
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, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness