alpaca-trade-api-sdk

alpaca-trade-api-sdk is a skill for Claude Code, Codex from alpacahq/alpaca-trade-api-js. It costs 123 tokens per session (4,121 once invoked), scanned A, original, Apache-2.0.

A TypeScript integration guide for the Alpaca Trading and Market Data APIs, services for placing trades and retrieving financial-market data.

In plain words
What is it for?
Use it when building or reviewing applications that submit orders, retrieve market data, handle pagination and typed errors, or receive live data streams.
Why use it?
It points developers to the SDK’s documented methods and explains common patterns without relying on guessed method names or parameters.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it when building or reviewing applications that submit orders, retrieve market data, handle pagination and typed errors, or receive live data streams.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk
Install

Getting it into your agent

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

Any agent
npx skills add alpacahq/alpaca-trade-api-js --skill alpaca-trade-api-sdk
Clone the repo
git clone --depth 1 https://github.com/alpacahq/alpaca-trade-api-js

Made for: Claude Code, Codex.

Wrote this? Show the measurements

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

agentmods badge for alpaca-trade-api-sdk

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

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

agentmods 80×15 button for alpaca-trade-api-sdk

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

What it costs to keep this loaded

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

ModelPer sessionOnce invoked
Fable 5.1 $0.00123 $0.04121
Opus 5.5 $0.00049 $0.01648
Sonnet 5.5 $0.00025 $0.00824
Haiku 4.5 $0.00012 $0.00412

Measured 4d ago against content hash e3655ed0174e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

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

Nothing flagged

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

skills/alpaca-trade-api-sdk/SKILL.md · 299 lines

How it starts

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

Building on @alpacahq/alpaca-trade-api

Guidance for LLMs and coding agents writing applications with @alpacahq/alpaca-trade-api. Packaged LLMS.md and the installable Agent Skill share this exact guidance body; use whichever integration your agent supports:

npx skills add alpacahq/alpaca-trade-api-js

For changes to the SDK repository itself, read the repo-only AGENTS.md instead.

This is a map, not the territory. It gives you the mental model, the idioms agents most often get wrong, and where to look. It deliberately omits the full API surface. Whenever you need specifics, use the hosted guides and curated API reference for discovery, then confirm exact signatures and response models in the installed package's TypeScript declarations (dist/*.d.ts), your editor's type information, or the installed src/ source. Do not guess method signatures from this file alone.

Where to look

Paths are relative to the package root—the repository root when developing here, or node_modules/@alpacahq/alpaca-trade-api/ when installed. The published tarball includes src/.

You need… Read / search
Workflows, conventions, and safety guidance Hosted guides: Getting started, Trading, Market data, Streaming & events, Authentication, Resilience & configuration, Pagination, Values & types, Testing, Runtime compatibility, Examples, the migration overview, the primary migration from 3.x, and the separate 4.x to 5.0 migration.
Curated per-method discovery and examples Hosted API Reference: Trading, Market data, Streaming, and Ergonomic helpers.
Exact installed-version signatures and model fields Installed dist/*.d.ts, your editor's type information, or installed src/.
Runnable end-to-end examples Hosted Examples or the repository examples.
The unified client / facade wiring src/client.ts
Order builders src/orders.ts
Normalized bar/trade/quote shapes + chart helpers src/marketDataShapes.ts
Curated, representative discovery maps src/capabilities.ts
Shared REST/SSE transport (retry/timeout/rate-limit/errors) src/core/runtime.ts, src/core/sse.ts
WebSocket clients src/streaming/

Read the full file on GitHub · 299 lines

Changes

What this file has done since we first saw it

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

  1. 4d ago Changed · +4 lines e3655ed0174e
  2. 25d ago Changed · +41 lines d62bcec0c5bd
  3. 1mo ago Changed · +2 lines 3cc280f2f24d
  4. 1mo ago Changed · +26 lines 4d77f4b5c8b1
  5. 1mo ago First seen · 226 lines · 123 tokens per session scan A 5f5ea5462a50

Subscribe to this mod's changes

alpaca-trade-api-sdk is a skill published in the GitHub repository alpacahq/alpaca-trade-api-js (601 stars, last pushed 4d ago), licensed Apache-2.0. It adds 123 tokens to every session and 4,121 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

graphql-api-development

Comprehensive guide for building GraphQL APIs including schema design, queries, mutations, subscriptions, resolvers, type system, error handling, authentication, authorization, caching strategies, and production best practices.

manutej/luxor-claude-marketplace · 42 tokens

psl-ast-layers

How to use the PSL syntax tree layers (green tree, red tree, strongly-typed AST classes) correctly. Use for any PSL-related work: PSL interpreters (contract-psl), helpers inside the psl-parser package, the language server, formatters, or anything else that consumes parse() output from @internal/psl-parser.

prisma/orm · 78 tokens

ast-visitor-pattern

Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.

prisma/orm · 65 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

client-setup

Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc/trpc · 63 tokens

vnpy-export

Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + ArrayManager.

HKUDS/Vibe-Trading · 40 tokens