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 (3,153 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.

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 3,153 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.03153
Opus 5 $0.00062 $0.01577
Sonnet 5 $0.00025 $0.00631
Haiku 4.5 $0.00012 $0.00315

Measured 11d ago against content hash 5f5ea5462a50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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 · 226 lines

How it starts

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

Building on @alpacahq/alpaca-trade-api

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 (exact method names, parameters, response fields), open the package README and grep the API reference: the README is ~2750 lines and its second half is an auto-generated, per-method reference. Do not guess method signatures from this file alone — confirm in the README or the source.

Where the source of truth lives

Paths are relative to the package root — the repo root when developing here, or node_modules/@alpacahq/alpaca-trade-api/ when installed (src/ ships in the published tarball).

You need… Read / search
The full per-method API (all REST methods, streams, ergonomic helpers) README.md → the ## API reference section (search the heading, then grep for the method name)
The narrative docs & idioms README.md → sections before ## API reference (Quick start, Placing orders, Pagination, Values & types, Normalized market-data shapes, Real-time streaming, …)
Runnable end-to-end examples examples/trading-bot.ts, examples/marketdata-backend.ts
The unified client / facade wiring src/client.ts
Order builders src/orders.ts
Normalized bar/trade/quote shapes + chart helpers src/marketDataShapes.ts
Programmatic capability maps src/capabilities.ts
Shared transport (retry/timeout/rate-limit/errors) src/core/runtime.ts
Streaming clients src/streaming/

When unsure where a method lives, prefer the programmatic lookups (below) over guessing, then confirm against the README.

Mental model: a two-layer facade

The Alpaca client bundles every Trading and Market Data API behind one constructor, reached via the .trading and .marketData namespaces.

  1. Generated (always present, uniform). Every generated REST method is reachable raw at alpaca.<group>.<resource>.<method>(...) — e.g. alpaca.trading.assets.getV2Assets(), alpaca.marketData.stocks.stockBars(...). Nothing is ever hidden.
  2. Ergonomic (additive, never replaces layer 1). Hand-written conveniences sit on top: order builders, normalized market-data accessors, pagination, workflow helpers. The raw method each one wraps is still available.

Read the full file on GitHub · 226 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. 11d 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 today), licensed Apache-2.0. It adds 123 tokens to every session and 3,153 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

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

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

bumping-biome

Bumps biome package versions (e.g. @biomejs/biome) using pnpm, aligns biome.jsonc files with the new version/s across the repository and runs biome-related checks. Use when required to update biome to a newer version - explicitly or implicitly (e.g. after running pnpm up, pnpm update, pnpm upgrade without specific…

prisma/orm · 96 tokens